/*
 * Copyright (C) 2020  Prasoon Joshi
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

// Generated by <a href="http://scalaxb.org/">scalaxb</a>.
package generated

import scala.concurrent.{ Future, ExecutionContext }


/**
usage:
val obj = scalaxb.fromXML[Foo](node)
val document = scalaxb.toXML[Foo](obj, "foo", defaultScope)
**/
object `package` extends XMLProtocol { }

trait XMLProtocol extends scalaxb.XMLStandardTypes {
  val defaultScope = scalaxb.toScope(None -> "http://ead3.archivists.org/schema/",
    Some("tns") -> "http://ead3.archivists.org/schema/",
    Some("xs") -> "http://www.w3.org/2001/XMLSchema",
    Some("xsi") -> "http://www.w3.org/2001/XMLSchema-instance")
  implicit lazy val Generated_EadFormat: scalaxb.XMLFormat[Ead] = new DefaultGenerated_EadFormat {}
  implicit lazy val Generated_LangencodingFormat: scalaxb.XMLFormat[Langencoding] = new DefaultGenerated_LangencodingFormat {}
  implicit lazy val Generated_ScriptencodingFormat: scalaxb.XMLFormat[Scriptencoding] = new DefaultGenerated_ScriptencodingFormat {}
  implicit lazy val Generated_DateencodingFormat: scalaxb.XMLFormat[Dateencoding] = new DefaultGenerated_DateencodingFormat {}
  implicit lazy val Generated_CountryencodingFormat: scalaxb.XMLFormat[Countryencoding] = new DefaultGenerated_CountryencodingFormat {}
  implicit lazy val Generated_RepositoryencodingFormat: scalaxb.XMLFormat[Repositoryencoding] = new DefaultGenerated_RepositoryencodingFormat {}
  implicit lazy val Generated_ControlFormat: scalaxb.XMLFormat[Control] = new DefaultGenerated_ControlFormat {}
  implicit lazy val Generated_RecordidFormat: scalaxb.XMLFormat[Recordid] = new DefaultGenerated_RecordidFormat {}
  implicit lazy val Generated_OtherrecordidFormat: scalaxb.XMLFormat[Otherrecordid] = new DefaultGenerated_OtherrecordidFormat {}
  implicit lazy val Generated_RepresentationFormat: scalaxb.XMLFormat[Representation] = new DefaultGenerated_RepresentationFormat {}
  implicit lazy val Generated_FiledescFormat: scalaxb.XMLFormat[Filedesc] = new DefaultGenerated_FiledescFormat {}
  implicit lazy val Generated_TitlestmtFormat: scalaxb.XMLFormat[Titlestmt] = new DefaultGenerated_TitlestmtFormat {}
  implicit lazy val Generated_EditionstmtFormat: scalaxb.XMLFormat[Editionstmt] = new DefaultGenerated_EditionstmtFormat {}
  implicit lazy val Generated_PublicationstmtFormat: scalaxb.XMLFormat[Publicationstmt] = new DefaultGenerated_PublicationstmtFormat {}
  implicit lazy val Generated_SeriesstmtFormat: scalaxb.XMLFormat[Seriesstmt] = new DefaultGenerated_SeriesstmtFormat {}
  implicit lazy val Generated_NotestmtFormat: scalaxb.XMLFormat[Notestmt] = new DefaultGenerated_NotestmtFormat {}
  implicit lazy val Generated_ValueFormat: scalaxb.XMLFormat[Value] = new DefaultGenerated_ValueFormat {}
  implicit lazy val Generated_MaintenancestatusFormat: scalaxb.XMLFormat[Maintenancestatus] = new DefaultGenerated_MaintenancestatusFormat {}
  implicit lazy val Generated_ValueTypeFormat: scalaxb.XMLFormat[ValueType] = new DefaultGenerated_ValueTypeFormat {}
  implicit lazy val Generated_PublicationstatusFormat: scalaxb.XMLFormat[Publicationstatus] = new DefaultGenerated_PublicationstatusFormat {}
  implicit lazy val Generated_LanguagedeclarationFormat: scalaxb.XMLFormat[Languagedeclaration] = new DefaultGenerated_LanguagedeclarationFormat {}
  implicit lazy val Generated_ConventiondeclarationFormat: scalaxb.XMLFormat[Conventiondeclaration] = new DefaultGenerated_ConventiondeclarationFormat {}
  implicit lazy val Generated_RightsdeclarationFormat: scalaxb.XMLFormat[Rightsdeclaration] = new DefaultGenerated_RightsdeclarationFormat {}
  implicit lazy val Generated_LocaltypedeclarationFormat: scalaxb.XMLFormat[Localtypedeclaration] = new DefaultGenerated_LocaltypedeclarationFormat {}
  implicit lazy val Generated_LocalcontrolFormat: scalaxb.XMLFormat[Localcontrol] = new DefaultGenerated_LocalcontrolFormat {}
  implicit lazy val Generated_TermFormat: scalaxb.XMLFormat[Term] = new DefaultGenerated_TermFormat {}
  implicit lazy val Generated_MaintenancehistoryFormat: scalaxb.XMLFormat[Maintenancehistory] = new DefaultGenerated_MaintenancehistoryFormat {}
  implicit lazy val Generated_MaintenanceeventFormat: scalaxb.XMLFormat[Maintenanceevent] = new DefaultGenerated_MaintenanceeventFormat {}
  implicit lazy val Generated_ValueType2Format: scalaxb.XMLFormat[ValueType2] = new DefaultGenerated_ValueType2Format {}
  implicit lazy val Generated_EventtypeFormat: scalaxb.XMLFormat[Eventtype] = new DefaultGenerated_EventtypeFormat {}
  implicit lazy val Generated_EventdatetimeFormat: scalaxb.XMLFormat[Eventdatetime] = new DefaultGenerated_EventdatetimeFormat {}
  implicit lazy val Generated_ValueType3Format: scalaxb.XMLFormat[ValueType3] = new DefaultGenerated_ValueType3Format {}
  implicit lazy val Generated_AgenttypeFormat: scalaxb.XMLFormat[Agenttype] = new DefaultGenerated_AgenttypeFormat {}
  implicit lazy val Generated_AgentFormat: scalaxb.XMLFormat[Agent] = new DefaultGenerated_AgentFormat {}
  implicit lazy val Generated_EventdescriptionFormat: scalaxb.XMLFormat[Eventdescription] = new DefaultGenerated_EventdescriptionFormat {}
  implicit lazy val Generated_SourcesFormat: scalaxb.XMLFormat[Sources] = new DefaultGenerated_SourcesFormat {}
  implicit lazy val Generated_SourceFormat: scalaxb.XMLFormat[Source] = new DefaultGenerated_SourceFormat {}
  implicit lazy val Generated_SourceentryFormat: scalaxb.XMLFormat[Sourceentry] = new DefaultGenerated_SourceentryFormat {}
  implicit lazy val Generated_RenderFormat: scalaxb.XMLFormat[Render] = new DefaultGenerated_RenderFormat {}
  implicit lazy val Generated_TitleproperFormat: scalaxb.XMLFormat[Titleproper] = new DefaultGenerated_TitleproperFormat {}
  implicit lazy val Generated_SubtitleFormat: scalaxb.XMLFormat[Subtitle] = new DefaultGenerated_SubtitleFormat {}
  implicit lazy val Generated_AuthorFormat: scalaxb.XMLFormat[Author] = new DefaultGenerated_AuthorFormat {}
  implicit lazy val Generated_SponsorFormat: scalaxb.XMLFormat[Sponsor] = new DefaultGenerated_SponsorFormat {}
  implicit lazy val Generated_EditionFormat: scalaxb.XMLFormat[Edition] = new DefaultGenerated_EditionFormat {}
  implicit lazy val Generated_PublisherFormat: scalaxb.XMLFormat[Publisher] = new DefaultGenerated_PublisherFormat {}
  implicit lazy val Generated_ControlnoteFormat: scalaxb.XMLFormat[Controlnote] = new DefaultGenerated_ControlnoteFormat {}
  implicit lazy val Generated_MaintenanceagencyFormat: scalaxb.XMLFormat[Maintenanceagency] = new DefaultGenerated_MaintenanceagencyFormat {}
  implicit lazy val Generated_AgencycodeFormat: scalaxb.XMLFormat[Agencycode] = new DefaultGenerated_AgencycodeFormat {}
  implicit lazy val Generated_OtheragencycodeFormat: scalaxb.XMLFormat[Otheragencycode] = new DefaultGenerated_OtheragencycodeFormat {}
  implicit lazy val Generated_AgencynameFormat: scalaxb.XMLFormat[Agencyname] = new DefaultGenerated_AgencynameFormat {}
  implicit lazy val Generated_CitationFormat: scalaxb.XMLFormat[Citation] = new DefaultGenerated_CitationFormat {}
  implicit lazy val Generated_ArchdescFormat: scalaxb.XMLFormat[ArchDescription] = new DefaultGenerated_ArchdescFormat {}
  implicit lazy val Generated_DidFormat: scalaxb.XMLFormat[Did] = new DefaultGenerated_DidFormat {}
  implicit lazy val Generated_AbstractFormat: scalaxb.XMLFormat[Abstract] = new DefaultGenerated_AbstractFormat {}
  implicit lazy val Generated_ContainerFormat: scalaxb.XMLFormat[Container] = new DefaultGenerated_ContainerFormat {}
  implicit lazy val Generated_DaotypeFormat: scalaxb.XMLFormat[Daotype] = new DefaultGenerated_DaotypeFormat {}
  implicit lazy val Generated_CoverageFormat: scalaxb.XMLFormat[Coverage] = new DefaultGenerated_CoverageFormat {}
  implicit lazy val Generated_DaoFormat: scalaxb.XMLFormat[Dao] = new DefaultGenerated_DaoFormat {}
  implicit lazy val Generated_CoverageTypeFormat: scalaxb.XMLFormat[CoverageType] = new DefaultGenerated_CoverageTypeFormat {}
  implicit lazy val Generated_DaosetFormat: scalaxb.XMLFormat[Daoset] = new DefaultGenerated_DaosetFormat {}
  implicit lazy val Generated_DidnoteFormat: scalaxb.XMLFormat[Didnote] = new DefaultGenerated_DidnoteFormat {}
  implicit lazy val Generated_LangmaterialFormat: scalaxb.XMLFormat[Langmaterial] = new DefaultGenerated_LangmaterialFormat {}
  implicit lazy val Generated_MaterialspecFormat: scalaxb.XMLFormat[Materialspec] = new DefaultGenerated_MaterialspecFormat {}
  implicit lazy val Generated_CoverageType2Format: scalaxb.XMLFormat[CoverageType2] = new DefaultGenerated_CoverageType2Format {}
  implicit lazy val Generated_PhysdescsetFormat: scalaxb.XMLFormat[Physdescset] = new DefaultGenerated_PhysdescsetFormat {}
  implicit lazy val Generated_PhysdescFormat: scalaxb.XMLFormat[Physdesc] = new DefaultGenerated_PhysdescFormat {}
  implicit lazy val Generated_PhyslocFormat: scalaxb.XMLFormat[Physloc] = new DefaultGenerated_PhyslocFormat {}
  implicit lazy val Generated_OriginationFormat: scalaxb.XMLFormat[Origination] = new DefaultGenerated_OriginationFormat {}
  implicit lazy val Generated_PhysdescstructuredtypeFormat: scalaxb.XMLFormat[Physdescstructuredtype] = new DefaultGenerated_PhysdescstructuredtypeFormat {}
  implicit lazy val Generated_PhysdescstructuredFormat: scalaxb.XMLFormat[Physdescstructured] = new DefaultGenerated_PhysdescstructuredFormat {}
  implicit lazy val Generated_QuantityFormat: scalaxb.XMLFormat[Quantity] = new DefaultGenerated_QuantityFormat {}
  implicit lazy val Generated_UnittypeFormat: scalaxb.XMLFormat[Unittype] = new DefaultGenerated_UnittypeFormat {}
  implicit lazy val Generated_RepositoryFormat: scalaxb.XMLFormat[Repository] = new DefaultGenerated_RepositoryFormat {}
  implicit lazy val Generated_UnitdateFormat: scalaxb.XMLFormat[Unitdate] = new DefaultGenerated_UnitdateFormat {}
  implicit lazy val Generated_UnitdatestructuredFormat: scalaxb.XMLFormat[Unitdatestructured] = new DefaultGenerated_UnitdatestructuredFormat {}
  implicit lazy val Generated_UnittitleFormat: scalaxb.XMLFormat[Unittitle] = new DefaultGenerated_UnittitleFormat {}
  implicit lazy val Generated_UnitidFormat: scalaxb.XMLFormat[Unitid] = new DefaultGenerated_UnitidFormat {}
  implicit lazy val Generated_AccessrestrictFormat: scalaxb.XMLFormat[Accessrestrict] = new DefaultGenerated_AccessrestrictFormat {}
  implicit lazy val Generated_AccrualsFormat: scalaxb.XMLFormat[Accruals] = new DefaultGenerated_AccrualsFormat {}
  implicit lazy val Generated_AcqinfoFormat: scalaxb.XMLFormat[Acqinfo] = new DefaultGenerated_AcqinfoFormat {}
  implicit lazy val Generated_AltformavailFormat: scalaxb.XMLFormat[Altformavail] = new DefaultGenerated_AltformavailFormat {}
  implicit lazy val Generated_AppraisalFormat: scalaxb.XMLFormat[Appraisal] = new DefaultGenerated_AppraisalFormat {}
  implicit lazy val Generated_ArrangementFormat: scalaxb.XMLFormat[Arrangement] = new DefaultGenerated_ArrangementFormat {}
  implicit lazy val Generated_BibliographyFormat: scalaxb.XMLFormat[Bibliography] = new DefaultGenerated_BibliographyFormat {}
  implicit lazy val Generated_BioghistFormat: scalaxb.XMLFormat[Bioghist] = new DefaultGenerated_BioghistFormat {}
  implicit lazy val Generated_ControlaccessFormat: scalaxb.XMLFormat[Controlaccess] = new DefaultGenerated_ControlaccessFormat {}
  implicit lazy val Generated_CustodhistFormat: scalaxb.XMLFormat[Custodhist] = new DefaultGenerated_CustodhistFormat {}
  implicit lazy val Generated_FileplanFormat: scalaxb.XMLFormat[Fileplan] = new DefaultGenerated_FileplanFormat {}
  implicit lazy val Generated_IndexFormat: scalaxb.XMLFormat[Index] = new DefaultGenerated_IndexFormat {}
  implicit lazy val Generated_IndexSequence1Format: scalaxb.XMLFormat[IndexSequence1] = new DefaultGenerated_IndexSequence1Format {}
  implicit lazy val Generated_IndexentryFormat: scalaxb.XMLFormat[Indexentry] = new DefaultGenerated_IndexentryFormat {}
  implicit lazy val Generated_NamegrpFormat: scalaxb.XMLFormat[Namegrp] = new DefaultGenerated_NamegrpFormat {}
  implicit lazy val Generated_PtrgrpFormat: scalaxb.XMLFormat[Ptrgrp] = new DefaultGenerated_PtrgrpFormat {}
  implicit lazy val Generated_LegalstatusFormat: scalaxb.XMLFormat[Legalstatus] = new DefaultGenerated_LegalstatusFormat {}
  implicit lazy val Generated_OddFormat: scalaxb.XMLFormat[Odd] = new DefaultGenerated_OddFormat {}
  implicit lazy val Generated_OriginalslocFormat: scalaxb.XMLFormat[Originalsloc] = new DefaultGenerated_OriginalslocFormat {}
  implicit lazy val Generated_OtherfindaidFormat: scalaxb.XMLFormat[Otherfindaid] = new DefaultGenerated_OtherfindaidFormat {}
  implicit lazy val Generated_PhystechFormat: scalaxb.XMLFormat[Phystech] = new DefaultGenerated_PhystechFormat {}
  implicit lazy val Generated_PreferciteFormat: scalaxb.XMLFormat[Prefercite] = new DefaultGenerated_PreferciteFormat {}
  implicit lazy val Generated_ProcessinfoFormat: scalaxb.XMLFormat[Processinfo] = new DefaultGenerated_ProcessinfoFormat {}
  implicit lazy val Generated_RelatedmaterialFormat: scalaxb.XMLFormat[Relatedmaterial] = new DefaultGenerated_RelatedmaterialFormat {}
  implicit lazy val Generated_ScopecontentFormat: scalaxb.XMLFormat[Scopecontent] = new DefaultGenerated_ScopecontentFormat {}
  implicit lazy val Generated_SeparatedmaterialFormat: scalaxb.XMLFormat[Separatedmaterial] = new DefaultGenerated_SeparatedmaterialFormat {}
  implicit lazy val Generated_UserestrictFormat: scalaxb.XMLFormat[Userestrict] = new DefaultGenerated_UserestrictFormat {}
  implicit lazy val Generated_CorpnameFormat: scalaxb.XMLFormat[Corpname] = new DefaultGenerated_CorpnameFormat {}
  implicit lazy val Generated_FamnameFormat: scalaxb.XMLFormat[Famname] = new DefaultGenerated_FamnameFormat {}
  implicit lazy val Generated_FunctionTypeFormat: scalaxb.XMLFormat[FunctionType] = new DefaultGenerated_FunctionTypeFormat {}
  implicit lazy val Generated_GenreformFormat: scalaxb.XMLFormat[Genreform] = new DefaultGenerated_GenreformFormat {}
  implicit lazy val Generated_GeognameFormat: scalaxb.XMLFormat[Geogname] = new DefaultGenerated_GeognameFormat {}
  implicit lazy val Generated_GeographiccoordinatesFormat: scalaxb.XMLFormat[Geographiccoordinates] = new DefaultGenerated_GeographiccoordinatesFormat {}
  implicit lazy val Generated_NameFormat: scalaxb.XMLFormat[Name] = new DefaultGenerated_NameFormat {}
  implicit lazy val Generated_OccupationFormat: scalaxb.XMLFormat[Occupation] = new DefaultGenerated_OccupationFormat {}
  implicit lazy val Generated_PersnameFormat: scalaxb.XMLFormat[Persname] = new DefaultGenerated_PersnameFormat {}
  implicit lazy val Generated_SubjectFormat: scalaxb.XMLFormat[Subject] = new DefaultGenerated_SubjectFormat {}
  implicit lazy val Generated_RenderTypeFormat: scalaxb.XMLFormat[RenderType] = new DefaultGenerated_RenderTypeFormat {}
  implicit lazy val Generated_TitleFormat: scalaxb.XMLFormat[Title] = new DefaultGenerated_TitleFormat {}
  implicit lazy val Generated_PartFormat: scalaxb.XMLFormat[Part] = new DefaultGenerated_PartFormat {}
  implicit lazy val Generated_PFormat: scalaxb.XMLFormat[P] = new DefaultGenerated_PFormat {}
  implicit lazy val Generated_BlockquoteFormat: scalaxb.XMLFormat[Blockquote] = new DefaultGenerated_BlockquoteFormat {}
  implicit lazy val Generated_ChronlistFormat: scalaxb.XMLFormat[Chronlist] = new DefaultGenerated_ChronlistFormat {}
  implicit lazy val Generated_ChronitemFormat: scalaxb.XMLFormat[Chronitem] = new DefaultGenerated_ChronitemFormat {}
  implicit lazy val Generated_ChronitemSequence1Format: scalaxb.XMLFormat[ChronitemSequence1] = new DefaultGenerated_ChronitemSequence1Format {}
  implicit lazy val Generated_ChronitemsetFormat: scalaxb.XMLFormat[Chronitemset] = new DefaultGenerated_ChronitemsetFormat {}
  implicit lazy val Generated_EventFormat: scalaxb.XMLFormat[Event] = new DefaultGenerated_EventFormat {}
  implicit lazy val Generated_ListtypeTypeFormat: scalaxb.XMLFormat[ListtypeType] = new DefaultGenerated_ListtypeTypeFormat {}
  implicit lazy val Generated_MarkFormat: scalaxb.XMLFormat[Mark] = new DefaultGenerated_MarkFormat {}
  implicit lazy val Generated_NumerationFormat: scalaxb.XMLFormat[Numeration] = new DefaultGenerated_NumerationFormat {}
  implicit lazy val Generated_ListTypeFormat: scalaxb.XMLFormat[ListType] = new DefaultGenerated_ListTypeFormat {}
  implicit lazy val Generated_ListTypeSequence1Format: scalaxb.XMLFormat[ListTypeSequence1] = new DefaultGenerated_ListTypeSequence1Format {}
  implicit lazy val Generated_DefitemFormat: scalaxb.XMLFormat[Defitem] = new DefaultGenerated_DefitemFormat {}
  implicit lazy val Generated_LabelFormat: scalaxb.XMLFormat[Label] = new DefaultGenerated_LabelFormat {}
  implicit lazy val Generated_ItemFormat: scalaxb.XMLFormat[Item] = new DefaultGenerated_ItemFormat {}
  implicit lazy val Generated_ListheadFormat: scalaxb.XMLFormat[Listhead] = new DefaultGenerated_ListheadFormat {}
  implicit lazy val Generated_Head01Format: scalaxb.XMLFormat[Head01] = new DefaultGenerated_Head01Format {}
  implicit lazy val Generated_Head02Format: scalaxb.XMLFormat[Head02] = new DefaultGenerated_Head02Format {}
  implicit lazy val Generated_Head03Format: scalaxb.XMLFormat[Head03] = new DefaultGenerated_Head03Format {}
  implicit lazy val Generated_FrameFormat: scalaxb.XMLFormat[Frame] = new DefaultGenerated_FrameFormat {}
  implicit lazy val Generated_TableFormat: scalaxb.XMLFormat[Table] = new DefaultGenerated_TableFormat {}
  implicit lazy val Generated_AlignFormat: scalaxb.XMLFormat[Align] = new DefaultGenerated_AlignFormat {}
  implicit lazy val Generated_TgroupFormat: scalaxb.XMLFormat[Tgroup] = new DefaultGenerated_TgroupFormat {}
  implicit lazy val Generated_AlignTypeFormat: scalaxb.XMLFormat[AlignType] = new DefaultGenerated_AlignTypeFormat {}
  implicit lazy val Generated_ColspecFormat: scalaxb.XMLFormat[Colspec] = new DefaultGenerated_ColspecFormat {}
  implicit lazy val Generated_ValignFormat: scalaxb.XMLFormat[Valign] = new DefaultGenerated_ValignFormat {}
  implicit lazy val Generated_TbodyFormat: scalaxb.XMLFormat[Tbody] = new DefaultGenerated_TbodyFormat {}
  implicit lazy val Generated_ValignTypeFormat: scalaxb.XMLFormat[ValignType] = new DefaultGenerated_ValignTypeFormat {}
  implicit lazy val Generated_RowFormat: scalaxb.XMLFormat[Row] = new DefaultGenerated_RowFormat {}
  implicit lazy val Generated_AlignType2Format: scalaxb.XMLFormat[AlignType2] = new DefaultGenerated_AlignType2Format {}
  implicit lazy val Generated_ValignType2Format: scalaxb.XMLFormat[ValignType2] = new DefaultGenerated_ValignType2Format {}
  implicit lazy val Generated_EntryFormat: scalaxb.XMLFormat[Entry] = new DefaultGenerated_EntryFormat {}
  implicit lazy val Generated_ValignType3Format: scalaxb.XMLFormat[ValignType3] = new DefaultGenerated_ValignType3Format {}
  implicit lazy val Generated_TheadFormat: scalaxb.XMLFormat[Thead] = new DefaultGenerated_TheadFormat {}
  implicit lazy val Generated_LanguageFormat: scalaxb.XMLFormat[Language] = new DefaultGenerated_LanguageFormat {}
  implicit lazy val Generated_LanguagesetFormat: scalaxb.XMLFormat[Languageset] = new DefaultGenerated_LanguagesetFormat {}
  implicit lazy val Generated_ScriptFormat: scalaxb.XMLFormat[Script] = new DefaultGenerated_ScriptFormat {}
  implicit lazy val Generated_DimensionsFormat: scalaxb.XMLFormat[Dimensions] = new DefaultGenerated_DimensionsFormat {}
  implicit lazy val Generated_PhysfacetFormat: scalaxb.XMLFormat[Physfacet] = new DefaultGenerated_PhysfacetFormat {}
  implicit lazy val Generated_AddressFormat: scalaxb.XMLFormat[Address] = new DefaultGenerated_AddressFormat {}
  implicit lazy val Generated_AddresslineFormat: scalaxb.XMLFormat[Addressline] = new DefaultGenerated_AddresslineFormat {}
  implicit lazy val Generated_ArchrefFormat: scalaxb.XMLFormat[Archref] = new DefaultGenerated_ArchrefFormat {}
  implicit lazy val Generated_BibrefFormat: scalaxb.XMLFormat[Bibref] = new DefaultGenerated_BibrefFormat {}
  implicit lazy val Generated_DescriptivenoteFormat: scalaxb.XMLFormat[Descriptivenote] = new DefaultGenerated_DescriptivenoteFormat {}
  implicit lazy val Generated_ShowFormat: scalaxb.XMLFormat[Show] = new DefaultGenerated_ShowFormat {}
  implicit lazy val Generated_ActuateFormat: scalaxb.XMLFormat[Actuate] = new DefaultGenerated_ActuateFormat {}
  implicit lazy val Generated_FootnoteFormat: scalaxb.XMLFormat[Footnote] = new DefaultGenerated_FootnoteFormat {}
  implicit lazy val Generated_HeadFormat: scalaxb.XMLFormat[Head] = new DefaultGenerated_HeadFormat {}
  implicit lazy val Generated_DatesingleFormat: scalaxb.XMLFormat[Datesingle] = new DefaultGenerated_DatesingleFormat {}
  implicit lazy val Generated_DaterangeFormat: scalaxb.XMLFormat[Daterange] = new DefaultGenerated_DaterangeFormat {}
  implicit lazy val Generated_FromdateFormat: scalaxb.XMLFormat[Fromdate] = new DefaultGenerated_FromdateFormat {}
  implicit lazy val Generated_TodateFormat: scalaxb.XMLFormat[Todate] = new DefaultGenerated_TodateFormat {}
  implicit lazy val Generated_DatesetFormat: scalaxb.XMLFormat[Dateset] = new DefaultGenerated_DatesetFormat {}
  implicit lazy val Generated_AbbrFormat: scalaxb.XMLFormat[Abbr] = new DefaultGenerated_AbbrFormat {}
  implicit lazy val Generated_DateFormat: scalaxb.XMLFormat[Date] = new DefaultGenerated_DateFormat {}
  implicit lazy val Generated_RenderType2Format: scalaxb.XMLFormat[RenderType2] = new DefaultGenerated_RenderType2Format {}
  implicit lazy val Generated_EmphFormat: scalaxb.XMLFormat[Emph] = new DefaultGenerated_EmphFormat {}
  implicit lazy val Generated_ExpanFormat: scalaxb.XMLFormat[Expan] = new DefaultGenerated_ExpanFormat {}
  implicit lazy val Generated_RenderType3Format: scalaxb.XMLFormat[RenderType3] = new DefaultGenerated_RenderType3Format {}
  implicit lazy val Generated_ForeignFormat: scalaxb.XMLFormat[Foreign] = new DefaultGenerated_ForeignFormat {}
  implicit lazy val Generated_LbFormat: scalaxb.XMLFormat[Lb] = new DefaultGenerated_LbFormat {}
  implicit lazy val Generated_NumFormat: scalaxb.XMLFormat[Num] = new DefaultGenerated_NumFormat {}
  implicit lazy val Generated_RenderType4Format: scalaxb.XMLFormat[RenderType4] = new DefaultGenerated_RenderType4Format {}
  implicit lazy val Generated_QuoteFormat: scalaxb.XMLFormat[Quote] = new DefaultGenerated_QuoteFormat {}
  implicit lazy val Generated_PtrFormat: scalaxb.XMLFormat[Ptr] = new DefaultGenerated_PtrFormat {}
  implicit lazy val Generated_RefFormat: scalaxb.XMLFormat[Ref] = new DefaultGenerated_RefFormat {}
  implicit lazy val Generated_DsctypeFormat: scalaxb.XMLFormat[Dsctype] = new DefaultGenerated_DsctypeFormat {}
  implicit lazy val Generated_DscFormat: scalaxb.XMLFormat[Dsc] = new DefaultGenerated_DscFormat {}
  implicit lazy val Generated_DscSequence1Format: scalaxb.XMLFormat[DscSequence1] = new DefaultGenerated_DscSequence1Format {}
  implicit lazy val Generated_CFormat: scalaxb.XMLFormat[C] = new DefaultGenerated_CFormat {}
  implicit lazy val Generated_CSequence1Format: scalaxb.XMLFormat[CSequence1] = new DefaultGenerated_CSequence1Format {}
  implicit lazy val Generated_C01Format: scalaxb.XMLFormat[C01] = new DefaultGenerated_C01Format {}
  implicit lazy val Generated_C01Sequence1Format: scalaxb.XMLFormat[C01Sequence1] = new DefaultGenerated_C01Sequence1Format {}
  implicit lazy val Generated_C02Format: scalaxb.XMLFormat[C02] = new DefaultGenerated_C02Format {}
  implicit lazy val Generated_C02Sequence1Format: scalaxb.XMLFormat[C02Sequence1] = new DefaultGenerated_C02Sequence1Format {}
  implicit lazy val Generated_C03Format: scalaxb.XMLFormat[C03] = new DefaultGenerated_C03Format {}
  implicit lazy val Generated_C03Sequence1Format: scalaxb.XMLFormat[C03Sequence1] = new DefaultGenerated_C03Sequence1Format {}
  implicit lazy val Generated_C04Format: scalaxb.XMLFormat[C04] = new DefaultGenerated_C04Format {}
  implicit lazy val Generated_C04Sequence1Format: scalaxb.XMLFormat[C04Sequence1] = new DefaultGenerated_C04Sequence1Format {}
  implicit lazy val Generated_C05Format: scalaxb.XMLFormat[C05] = new DefaultGenerated_C05Format {}
  implicit lazy val Generated_C05Sequence1Format: scalaxb.XMLFormat[C05Sequence1] = new DefaultGenerated_C05Sequence1Format {}
  implicit lazy val Generated_C06Format: scalaxb.XMLFormat[C06] = new DefaultGenerated_C06Format {}
  implicit lazy val Generated_C06Sequence1Format: scalaxb.XMLFormat[C06Sequence1] = new DefaultGenerated_C06Sequence1Format {}
  implicit lazy val Generated_C07Format: scalaxb.XMLFormat[C07] = new DefaultGenerated_C07Format {}
  implicit lazy val Generated_C07Sequence1Format: scalaxb.XMLFormat[C07Sequence1] = new DefaultGenerated_C07Sequence1Format {}
  implicit lazy val Generated_C08Format: scalaxb.XMLFormat[C08] = new DefaultGenerated_C08Format {}
  implicit lazy val Generated_C08Sequence1Format: scalaxb.XMLFormat[C08Sequence1] = new DefaultGenerated_C08Sequence1Format {}
  implicit lazy val Generated_C09Format: scalaxb.XMLFormat[C09] = new DefaultGenerated_C09Format {}
  implicit lazy val Generated_C09Sequence1Format: scalaxb.XMLFormat[C09Sequence1] = new DefaultGenerated_C09Sequence1Format {}
  implicit lazy val Generated_C10Format: scalaxb.XMLFormat[C10] = new DefaultGenerated_C10Format {}
  implicit lazy val Generated_C10Sequence1Format: scalaxb.XMLFormat[C10Sequence1] = new DefaultGenerated_C10Sequence1Format {}
  implicit lazy val Generated_C11Format: scalaxb.XMLFormat[C11] = new DefaultGenerated_C11Format {}
  implicit lazy val Generated_C11Sequence1Format: scalaxb.XMLFormat[C11Sequence1] = new DefaultGenerated_C11Sequence1Format {}
  implicit lazy val Generated_C12Format: scalaxb.XMLFormat[C12] = new DefaultGenerated_C12Format {}
  implicit lazy val Generated_RelationsFormat: scalaxb.XMLFormat[Relations] = new DefaultGenerated_RelationsFormat {}
  implicit lazy val Generated_RelationtypeFormat: scalaxb.XMLFormat[Relationtype] = new DefaultGenerated_RelationtypeFormat {}
  implicit lazy val Generated_RelationFormat: scalaxb.XMLFormat[Relation] = new DefaultGenerated_RelationFormat {}
  implicit lazy val Generated_RelationentryFormat: scalaxb.XMLFormat[Relationentry] = new DefaultGenerated_RelationentryFormat {}
  implicit lazy val Generated_ObjectxmlwrapFormat: scalaxb.XMLFormat[Objectxmlwrap] = new DefaultGenerated_ObjectxmlwrapFormat {}
  implicit lazy val Generated_Eu46anynamableFormat: scalaxb.XMLFormat[Eu46anynamable] = new DefaultGenerated_Eu46anynamableFormat {}
  implicit lazy val Generated_Eu46anynameFormat: scalaxb.XMLFormat[Eu46anyname] = new DefaultGenerated_Eu46anynameFormat {}
  implicit lazy val Generated_Mu46cu46basableFormat: scalaxb.XMLFormat[Mu46cu46basable] = new DefaultGenerated_Mu46cu46basableFormat {}
  implicit lazy val Generated_Mu46cu46baseFormat: scalaxb.XMLFormat[Mu46cu46base] = new DefaultGenerated_Mu46cu46baseFormat {}
  implicit lazy val Generated_Mu46datesinglableFormat: scalaxb.XMLFormat[Mu46datesinglable] = new DefaultGenerated_Mu46datesinglableFormat {}
  implicit lazy val Generated_Mu46datesingleFormat: scalaxb.XMLFormat[Mu46datesingle] = new DefaultGenerated_Mu46datesingleFormat {}
  implicit lazy val Generated_Mu46mixedu46basicableFormat: scalaxb.XMLFormat[Mu46mixedu46basicable] = new DefaultGenerated_Mu46mixedu46basicableFormat {}
  implicit lazy val Generated_Mu46mixedu46basicFormat: scalaxb.XMLFormat[Mu46mixedu46basic] = new DefaultGenerated_Mu46mixedu46basicFormat {}
  implicit lazy val Generated_Mu46mixedu46basicu46datableFormat: scalaxb.XMLFormat[Mu46mixedu46basicu46datable] = new DefaultGenerated_Mu46mixedu46basicu46datableFormat {}
  implicit lazy val Generated_Mu46mixedu46basicu46dateFormat: scalaxb.XMLFormat[Mu46mixedu46basicu46date] = new DefaultGenerated_Mu46mixedu46basicu46dateFormat {}
  implicit lazy val Generated_Mu46mixedu46basicu46plusu46accessableFormat: scalaxb.XMLFormat[Mu46mixedu46basicu46plusu46accessable] = new DefaultGenerated_Mu46mixedu46basicu46plusu46accessableFormat {}
  implicit lazy val Generated_Mu46mixedu46basicu46plusu46accessFormat: scalaxb.XMLFormat[Mu46mixedu46basicu46plusu46access] = new DefaultGenerated_Mu46mixedu46basicu46plusu46accessFormat {}
  implicit lazy val Generated_Mu46parau46contentableFormat: scalaxb.XMLFormat[Mu46parau46contentable] = new DefaultGenerated_Mu46parau46contentableFormat {}
  implicit lazy val Generated_Mu46parau46contentFormat: scalaxb.XMLFormat[Mu46parau46content] = new DefaultGenerated_Mu46parau46contentFormat {}
  implicit lazy val Generated_ShowTypeFormat: scalaxb.XMLFormat[ShowType] = new DefaultGenerated_ShowTypeFormat {}
  implicit lazy val Generated_ActuateTypeFormat: scalaxb.XMLFormat[ActuateType] = new DefaultGenerated_ActuateTypeFormat {}
  implicit lazy val Generated_AudienceFormat: scalaxb.XMLFormat[Audience] = new DefaultGenerated_AudienceFormat {}
  implicit lazy val Generated_LevelFormat: scalaxb.XMLFormat[Level] = new DefaultGenerated_LevelFormat {}
  implicit lazy val Generated_ActuateType2Format: scalaxb.XMLFormat[ActuateType2] = new DefaultGenerated_ActuateType2Format {}
  implicit lazy val Generated_ShowType2Format: scalaxb.XMLFormat[ShowType2] = new DefaultGenerated_ShowType2Format {}
  implicit lazy val Generated_AlignType3Format: scalaxb.XMLFormat[AlignType3] = new DefaultGenerated_AlignType3Format {}
  implicit lazy val Generated_ValignType4Format: scalaxb.XMLFormat[ValignType4] = new DefaultGenerated_ValignType4Format {}
  implicit lazy val Generated_RenderType5Format: scalaxb.XMLFormat[RenderType5] = new DefaultGenerated_RenderType5Format {}
  implicit lazy val Generated_LevelTypeFormat: scalaxb.XMLFormat[LevelType] = new DefaultGenerated_LevelTypeFormat {}
  implicit lazy val Generated_UnitdatetypeFormat: scalaxb.XMLFormat[Unitdatetype] = new DefaultGenerated_UnitdatetypeFormat {}
  implicit lazy val Generated_CoverageType3Format: scalaxb.XMLFormat[CoverageType3] = new DefaultGenerated_CoverageType3Format {}
  implicit lazy val Generated_Avu46booleanFormat: scalaxb.XMLFormat[Avu46boolean] = new DefaultGenerated_Avu46booleanFormat {}
  implicit lazy val Generated_Au46transliterationFormat: scalaxb.AttributeGroupFormat[Au46transliteration] = new DefaultGenerated_Au46transliterationFormat {}
  implicit lazy val Generated_Au46coverageFormat: scalaxb.AttributeGroupFormat[Au46coverage] = new DefaultGenerated_Au46coverageFormat {}
  implicit lazy val Generated_Au46colsepFormat: scalaxb.AttributeGroupFormat[Au46colsep] = new DefaultGenerated_Au46colsepFormat {}
  implicit lazy val Generated_Au46charoffFormat: scalaxb.AttributeGroupFormat[Au46charoff] = new DefaultGenerated_Au46charoffFormat {}
  implicit lazy val Generated_Au46unitdatetypeFormat: scalaxb.AttributeGroupFormat[Au46unitdatetype] = new DefaultGenerated_Au46unitdatetypeFormat {}
  implicit lazy val Generated_Au46localtypeFormat: scalaxb.AttributeGroupFormat[Au46localtype] = new DefaultGenerated_Au46localtypeFormat {}
  implicit lazy val Generated_Au46encodinganalogFormat: scalaxb.AttributeGroupFormat[Au46encodinganalog] = new DefaultGenerated_Au46encodinganalogFormat {}
  implicit lazy val Generated_Au46certaintyFormat: scalaxb.AttributeGroupFormat[Au46certainty] = new DefaultGenerated_Au46certaintyFormat {}
  implicit lazy val Generated_Au46lastdatetimeverifiedFormat: scalaxb.AttributeGroupFormat[Au46lastdatetimeverified] = new DefaultGenerated_Au46lastdatetimeverifiedFormat {}
  implicit lazy val Generated_Amu46datesu46eraFormat: scalaxb.AttributeGroupFormat[Amu46datesu46era] = new DefaultGenerated_Amu46datesu46eraFormat {}
  implicit lazy val Generated_Au46labelFormat: scalaxb.AttributeGroupFormat[Au46label] = new DefaultGenerated_Au46labelFormat {}
  implicit lazy val Generated_Au46valignFormat: scalaxb.AttributeGroupFormat[Au46valign] = new DefaultGenerated_Au46valignFormat {}
  implicit lazy val Generated_Au46entityrefFormat: scalaxb.AttributeGroupFormat[Au46entityref] = new DefaultGenerated_Au46entityrefFormat {}
  implicit lazy val Generated_Au46relatorFormat: scalaxb.AttributeGroupFormat[Au46relator] = new DefaultGenerated_Au46relatorFormat {}
  implicit lazy val Generated_Au46identifierFormat: scalaxb.AttributeGroupFormat[Au46identifier] = new DefaultGenerated_Au46identifierFormat {}
  implicit lazy val Generated_Au46linku46titleFormat: scalaxb.AttributeGroupFormat[Au46linku46title] = new DefaultGenerated_Au46linku46titleFormat {}
  implicit lazy val Generated_Au46linku46roleFormat: scalaxb.AttributeGroupFormat[Au46linku46role] = new DefaultGenerated_Au46linku46roleFormat {}
  implicit lazy val Generated_Au46linku46arcroleFormat: scalaxb.AttributeGroupFormat[Au46linku46arcrole] = new DefaultGenerated_Au46linku46arcroleFormat {}
  implicit lazy val Generated_Amu46accessu46nou46normalFormat: scalaxb.AttributeGroupFormat[Amu46accessu46nou46normal] = new DefaultGenerated_Amu46accessu46nou46normalFormat {}
  implicit lazy val Generated_Amu46descu46cFormat: scalaxb.AttributeGroupFormat[Amu46descu46c] = new DefaultGenerated_Amu46descu46cFormat {}
  implicit lazy val Generated_Amu46commonFormat: scalaxb.AttributeGroupFormat[Amu46common] = new DefaultGenerated_Amu46commonFormat {}
  implicit lazy val Generated_Amu46simplelinkFormat: scalaxb.AttributeGroupFormat[Amu46simplelink] = new DefaultGenerated_Amu46simplelinkFormat {}
  implicit lazy val Generated_Amu46internalu46ptrFormat: scalaxb.AttributeGroupFormat[Amu46internalu46ptr] = new DefaultGenerated_Amu46internalu46ptrFormat {}
  implicit lazy val Generated_Amu46commonu46emptyFormat: scalaxb.AttributeGroupFormat[Amu46commonu46empty] = new DefaultGenerated_Amu46commonu46emptyFormat {}
  implicit lazy val Generated_Amu46descu46baseFormat: scalaxb.AttributeGroupFormat[Amu46descu46base] = new DefaultGenerated_Amu46descu46baseFormat {}
  implicit lazy val Generated_Amu46accessFormat: scalaxb.AttributeGroupFormat[Amu46access] = new DefaultGenerated_Amu46accessFormat {}
  implicit lazy val Generated_Au46linku46actuateFormat: scalaxb.AttributeGroupFormat[Au46linku46actuate] = new DefaultGenerated_Au46linku46actuateFormat {}
  implicit lazy val Generated_Au46linku46hrefFormat: scalaxb.AttributeGroupFormat[Au46linku46href] = new DefaultGenerated_Au46linku46hrefFormat {}
  implicit lazy val Generated_Au46linku46showFormat: scalaxb.AttributeGroupFormat[Au46linku46show] = new DefaultGenerated_Au46linku46showFormat {}
  implicit lazy val Generated_Au46baseFormat: scalaxb.AttributeGroupFormat[Au46base] = new DefaultGenerated_Au46baseFormat {}
  implicit lazy val Generated_Au46parentFormat: scalaxb.AttributeGroupFormat[Au46parent] = new DefaultGenerated_Au46parentFormat {}
  implicit lazy val Generated_Au46linku46xpointerFormat: scalaxb.AttributeGroupFormat[Au46linku46xpointer] = new DefaultGenerated_Au46linku46xpointerFormat {}
  implicit lazy val Generated_Au46alignFormat: scalaxb.AttributeGroupFormat[Au46align] = new DefaultGenerated_Au46alignFormat {}
  implicit lazy val Generated_Au46renderFormat: scalaxb.AttributeGroupFormat[Au46render] = new DefaultGenerated_Au46renderFormat {}
  implicit lazy val Generated_Amu46datesu46calendarFormat: scalaxb.AttributeGroupFormat[Amu46datesu46calendar] = new DefaultGenerated_Amu46datesu46calendarFormat {}
  implicit lazy val Generated_Amu46dateu46normalFormat: scalaxb.AttributeGroupFormat[Amu46dateu46normal] = new DefaultGenerated_Amu46dateu46normalFormat {}
  implicit lazy val Generated_Au46datecharFormat: scalaxb.AttributeGroupFormat[Au46datechar] = new DefaultGenerated_Au46datecharFormat {}
  implicit lazy val Generated_Au46normalFormat: scalaxb.AttributeGroupFormat[Au46normal] = new DefaultGenerated_Au46normalFormat {}
  implicit lazy val Generated_Au46levelFormat: scalaxb.AttributeGroupFormat[Au46level] = new DefaultGenerated_Au46levelFormat {}
  implicit lazy val Generated_Au46relatedencodingFormat: scalaxb.AttributeGroupFormat[Au46relatedencoding] = new DefaultGenerated_Au46relatedencodingFormat {}
  implicit lazy val Generated_Au46charFormat: scalaxb.AttributeGroupFormat[Au46char] = new DefaultGenerated_Au46charFormat {}
  implicit lazy val Generated_Au46colnameFormat: scalaxb.AttributeGroupFormat[Au46colname] = new DefaultGenerated_Au46colnameFormat {}
  implicit lazy val Generated_Au46rowsepFormat: scalaxb.AttributeGroupFormat[Au46rowsep] = new DefaultGenerated_Au46rowsepFormat {}
  implicit lazy val Generated_Amu46countrycodeFormat: scalaxb.AttributeGroupFormat[Amu46countrycode] = new DefaultGenerated_Amu46countrycodeFormat {}


  implicit val fromAnySchemaType: scala.xml.Elem => Option[scalaxb.DataRecord[Any]] = {elem =>
    import scalaxb.{Helper, DataRecord, fromXML}

    val ns = Helper.nullOrEmpty(elem.scope.getURI(elem.prefix))
    val key = Some(elem.label)
    val (xsns, xstype) = Helper.instanceType(elem)

    (key, ns) match {
      case (Some("ead"), Some("http://ead3.archivists.org/schema/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Ead](elem)))

      case _ => None
    }


  }

  trait DefaultGenerated_EadFormat extends scalaxb.ElemNameParser[Ead] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Ead] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "control")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "archdesc")) ^^
      { case p1 ~ p2 =>
      Ead(scalaxb.fromXML[Control](p1, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[ArchDescription](p2, scalaxb.ElemName(node) :: stack),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@relatedencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relatedencoding" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Ead, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@relatedencoding", _) => __obj.relatedencoding foreach { x => attr = scala.xml.Attribute(null, "relatedencoding", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Ead, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Control](__obj.control, Some("http://ead3.archivists.org/schema/"), Some("control"), __scope, false),
        scalaxb.toXML[ArchDescription](__obj.archdesc, Some("http://ead3.archivists.org/schema/"), Some("archdesc"), __scope, false))

  }

  def buildGenerated_LangencodingFormat = new DefaultGenerated_LangencodingFormat {}
  trait DefaultGenerated_LangencodingFormat extends scalaxb.XMLFormat[Langencoding] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Langencoding = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("iso639-1")) => Iso639u451
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("iso639-2b")) => Iso639u452b
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("iso639-3")) => Iso639u453
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherlangencoding")) => Otherlangencoding

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Langencoding] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Langencoding, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_ScriptencodingFormat = new DefaultGenerated_ScriptencodingFormat {}
  trait DefaultGenerated_ScriptencodingFormat extends scalaxb.XMLFormat[Scriptencoding] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Scriptencoding = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("iso15924")) => Iso15924
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherscriptencoding")) => Otherscriptencoding

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Scriptencoding] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Scriptencoding, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_DateencodingFormat = new DefaultGenerated_DateencodingFormat {}
  trait DefaultGenerated_DateencodingFormat extends scalaxb.XMLFormat[Dateencoding] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Dateencoding = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("iso8601")) => Iso8601
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherdateencoding")) => Otherdateencoding

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Dateencoding] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Dateencoding, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_CountryencodingFormat = new DefaultGenerated_CountryencodingFormat {}
  trait DefaultGenerated_CountryencodingFormat extends scalaxb.XMLFormat[Countryencoding] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Countryencoding = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("iso3166-1")) => Iso3166u451
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("othercountryencoding")) => Othercountryencoding

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Countryencoding] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Countryencoding, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_RepositoryencodingFormat = new DefaultGenerated_RepositoryencodingFormat {}
  trait DefaultGenerated_RepositoryencodingFormat extends scalaxb.XMLFormat[Repositoryencoding] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Repositoryencoding = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("iso15511")) => Iso15511
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherrepositoryencoding")) => Otherrepositoryencoding

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Repositoryencoding] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Repositoryencoding, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_ControlFormat extends scalaxb.ElemNameParser[Control] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("control")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Control] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "recordid")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "otherrecordid")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "representation")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "filedesc")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "maintenancestatus")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "publicationstatus")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "maintenanceagency")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "languagedeclaration")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "conventiondeclaration")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "rightsdeclaration")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "localtypedeclaration")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "localcontrol")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "maintenancehistory")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "sources")) ^^
      { case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 ~ p10 ~ p11 ~ p12 ~ p13 ~ p14 =>
      Control(scalaxb.fromXML[Recordid](p1, scalaxb.ElemName(node) :: stack),
        p2 map { scalaxb.fromXML[Otherrecordid](_, scalaxb.ElemName(node) :: stack) },
        p3 map { scalaxb.fromXML[Representation](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Filedesc](p4, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[Maintenancestatus](p5, scalaxb.ElemName(node) :: stack),
        p6.headOption map { scalaxb.fromXML[Publicationstatus](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Maintenanceagency](p7, scalaxb.ElemName(node) :: stack),
        p8 map { scalaxb.fromXML[Languagedeclaration](_, scalaxb.ElemName(node) :: stack) },
        p9 map { scalaxb.fromXML[Conventiondeclaration](_, scalaxb.ElemName(node) :: stack) },
        p10 map { scalaxb.fromXML[Rightsdeclaration](_, scalaxb.ElemName(node) :: stack) },
        p11 map { scalaxb.fromXML[Localtypedeclaration](_, scalaxb.ElemName(node) :: stack) },
        p12 map { scalaxb.fromXML[Localcontrol](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Maintenancehistory](p13, scalaxb.ElemName(node) :: stack),
        p14.headOption map { scalaxb.fromXML[Sources](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relatedencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relatedencoding" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@langencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Langencoding](x, scalaxb.ElemName(node) :: stack)) } map { "@langencoding" -> _ },
        (node \ "@scriptencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Scriptencoding](x, scalaxb.ElemName(node) :: stack)) } map { "@scriptencoding" -> _ },
        (node \ "@dateencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Dateencoding](x, scalaxb.ElemName(node) :: stack)) } map { "@dateencoding" -> _ },
        (node \ "@countryencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Countryencoding](x, scalaxb.ElemName(node) :: stack)) } map { "@countryencoding" -> _ },
        (node \ "@repositoryencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Repositoryencoding](x, scalaxb.ElemName(node) :: stack)) } map { "@repositoryencoding" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Control, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relatedencoding", _) => __obj.relatedencoding foreach { x => attr = scala.xml.Attribute(null, "relatedencoding", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@langencoding", _) => __obj.langencoding foreach { x => attr = scala.xml.Attribute(null, "langencoding", x.toString, attr) }
        case ("@scriptencoding", _) => __obj.scriptencoding foreach { x => attr = scala.xml.Attribute(null, "scriptencoding", x.toString, attr) }
        case ("@dateencoding", _) => __obj.dateencoding foreach { x => attr = scala.xml.Attribute(null, "dateencoding", x.toString, attr) }
        case ("@countryencoding", _) => __obj.countryencoding foreach { x => attr = scala.xml.Attribute(null, "countryencoding", x.toString, attr) }
        case ("@repositoryencoding", _) => __obj.repositoryencoding foreach { x => attr = scala.xml.Attribute(null, "repositoryencoding", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Control, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Recordid](__obj.recordid, Some("http://ead3.archivists.org/schema/"), Some("recordid"), __scope, false),
        __obj.otherrecordid flatMap { scalaxb.toXML[Otherrecordid](_, Some("http://ead3.archivists.org/schema/"), Some("otherrecordid"), __scope, false) },
        __obj.representation flatMap { scalaxb.toXML[Representation](_, Some("http://ead3.archivists.org/schema/"), Some("representation"), __scope, false) },
        scalaxb.toXML[Filedesc](__obj.filedesc, Some("http://ead3.archivists.org/schema/"), Some("filedesc"), __scope, false),
        scalaxb.toXML[Maintenancestatus](__obj.maintenancestatus, Some("http://ead3.archivists.org/schema/"), Some("maintenancestatus"), __scope, false),
        __obj.publicationstatus map { scalaxb.toXML[Publicationstatus](_, Some("http://ead3.archivists.org/schema/"), Some("publicationstatus"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Maintenanceagency](__obj.maintenanceagency, Some("http://ead3.archivists.org/schema/"), Some("maintenanceagency"), __scope, false),
        __obj.languagedeclaration flatMap { scalaxb.toXML[Languagedeclaration](_, Some("http://ead3.archivists.org/schema/"), Some("languagedeclaration"), __scope, false) },
        __obj.conventiondeclaration flatMap { scalaxb.toXML[Conventiondeclaration](_, Some("http://ead3.archivists.org/schema/"), Some("conventiondeclaration"), __scope, false) },
        __obj.rightsdeclaration flatMap { scalaxb.toXML[Rightsdeclaration](_, Some("http://ead3.archivists.org/schema/"), Some("rightsdeclaration"), __scope, false) },
        __obj.localtypedeclaration flatMap { scalaxb.toXML[Localtypedeclaration](_, Some("http://ead3.archivists.org/schema/"), Some("localtypedeclaration"), __scope, false) },
        __obj.localcontrol flatMap { scalaxb.toXML[Localcontrol](_, Some("http://ead3.archivists.org/schema/"), Some("localcontrol"), __scope, false) },
        scalaxb.toXML[Maintenancehistory](__obj.maintenancehistory, Some("http://ead3.archivists.org/schema/"), Some("maintenancehistory"), __scope, false),
        __obj.sources map { scalaxb.toXML[Sources](_, Some("http://ead3.archivists.org/schema/"), Some("sources"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_RecordidFormat extends scalaxb.ElemNameParser[Recordid] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("recordid")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Recordid] =
      phrase(optTextRecord ^^
      { case p1 =>
      Recordid(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@instanceurl").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@instanceurl" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Recordid, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@instanceurl", _) => __obj.instanceurl foreach { x => attr = scala.xml.Attribute(null, "instanceurl", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Recordid, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_OtherrecordidFormat extends scalaxb.ElemNameParser[Otherrecordid] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("otherrecordid")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Otherrecordid] =
      phrase(optTextRecord ^^
      { case p1 =>
      Otherrecordid(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Otherrecordid, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Otherrecordid, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_RepresentationFormat extends scalaxb.ElemNameParser[Representation] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("representation")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Representation] =
      phrase(optTextRecord ^^
      { case p1 =>
      Representation(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ },
        (node \ "@linkrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@linkrole" -> _ },
        (node \ "@arcrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@arcrole" -> _ },
        (node \ "@linktitle").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@linktitle" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ShowType](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ActuateType](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Representation, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
        case ("@linkrole", _) => __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
        case ("@arcrole", _) => __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
        case ("@linktitle", _) => __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Representation, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_FiledescFormat extends scalaxb.ElemNameParser[Filedesc] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("filedesc")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Filedesc] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "titlestmt")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "editionstmt")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "publicationstmt")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "seriesstmt")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "notestmt")) ^^
      { case p1 ~ p2 ~ p3 ~ p4 ~ p5 =>
      Filedesc(scalaxb.fromXML[Titlestmt](p1, scalaxb.ElemName(node) :: stack),
        p2.headOption map { scalaxb.fromXML[Editionstmt](_, scalaxb.ElemName(node) :: stack) },
        p3.headOption map { scalaxb.fromXML[Publicationstmt](_, scalaxb.ElemName(node) :: stack) },
        p4.headOption map { scalaxb.fromXML[Seriesstmt](_, scalaxb.ElemName(node) :: stack) },
        p5.headOption map { scalaxb.fromXML[Notestmt](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Filedesc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Filedesc, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Titlestmt](__obj.titlestmt, Some("http://ead3.archivists.org/schema/"), Some("titlestmt"), __scope, false),
        __obj.editionstmt map { scalaxb.toXML[Editionstmt](_, Some("http://ead3.archivists.org/schema/"), Some("editionstmt"), __scope, false) } getOrElse {Nil},
        __obj.publicationstmt map { scalaxb.toXML[Publicationstmt](_, Some("http://ead3.archivists.org/schema/"), Some("publicationstmt"), __scope, false) } getOrElse {Nil},
        __obj.seriesstmt map { scalaxb.toXML[Seriesstmt](_, Some("http://ead3.archivists.org/schema/"), Some("seriesstmt"), __scope, false) } getOrElse {Nil},
        __obj.notestmt map { scalaxb.toXML[Notestmt](_, Some("http://ead3.archivists.org/schema/"), Some("notestmt"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_TitlestmtFormat extends scalaxb.ElemNameParser[Titlestmt] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("titlestmt")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Titlestmt] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "titleproper")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "subtitle")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "author")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "sponsor")) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      Titlestmt(p1 map { scalaxb.fromXML[Titleproper](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Subtitle](_, scalaxb.ElemName(node) :: stack) },
        p3 map { scalaxb.fromXML[Author](_, scalaxb.ElemName(node) :: stack) },
        p4 map { scalaxb.fromXML[Sponsor](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Titlestmt, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Titlestmt, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.titleproper flatMap { scalaxb.toXML[Titleproper](_, Some("http://ead3.archivists.org/schema/"), Some("titleproper"), __scope, false) },
        __obj.subtitle flatMap { scalaxb.toXML[Subtitle](_, Some("http://ead3.archivists.org/schema/"), Some("subtitle"), __scope, false) },
        __obj.author flatMap { scalaxb.toXML[Author](_, Some("http://ead3.archivists.org/schema/"), Some("author"), __scope, false) },
        __obj.sponsor flatMap { scalaxb.toXML[Sponsor](_, Some("http://ead3.archivists.org/schema/"), Some("sponsor"), __scope, false) })

  }

  trait DefaultGenerated_EditionstmtFormat extends scalaxb.ElemNameParser[Editionstmt] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("editionstmt")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Editionstmt] =
      phrase(safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "edition")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Edition](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 =>
      Editionstmt(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Editionstmt, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Editionstmt, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.editionstmtoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[EditionstmtOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_PublicationstmtFormat extends scalaxb.ElemNameParser[Publicationstmt] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("publicationstmt")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Publicationstmt] =
      phrase(safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "publisher")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Publisher](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "address")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Address](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 =>
      Publicationstmt(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Publicationstmt, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Publicationstmt, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.publicationstmtoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[PublicationstmtOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_SeriesstmtFormat extends scalaxb.ElemNameParser[Seriesstmt] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("seriesstmt")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seriesstmt] =
      phrase(safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "titleproper")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Titleproper](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 =>
      Seriesstmt(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Seriesstmt, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Seriesstmt, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.seriesstmtoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[SeriesstmtOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_NotestmtFormat extends scalaxb.ElemNameParser[Notestmt] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("notestmt")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Notestmt] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "controlnote")) ^^
      { case p1 =>
      Notestmt(p1 map { scalaxb.fromXML[Controlnote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Notestmt, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Notestmt, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.controlnote flatMap { scalaxb.toXML[Controlnote](_, Some("http://ead3.archivists.org/schema/"), Some("controlnote"), __scope, false) })

  }

  def buildGenerated_ValueFormat = new DefaultGenerated_ValueFormat {}
  trait DefaultGenerated_ValueFormat extends scalaxb.XMLFormat[Value] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Value = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("revised")) => Revised
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("deleted")) => Deleted
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("new")) => New
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("deletedsplit")) => Deletedsplit
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("deletedmerged")) => Deletedmerged
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("deletedreplaced")) => Deletedreplaced
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("cancelled")) => Cancelled
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("derived")) => Derived

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Value] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Value, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_MaintenancestatusFormat extends scalaxb.ElemNameParser[Maintenancestatus] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("maintenancestatus")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Maintenancestatus] =
      phrase(optTextRecord ^^
      { case p1 =>
      Maintenancestatus(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Value](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Maintenancestatus, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@value", _) => attr = scala.xml.Attribute(null, "value", __obj.valueAttribute.toString, attr)
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Maintenancestatus, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_ValueTypeFormat = new DefaultGenerated_ValueTypeFormat {}
  trait DefaultGenerated_ValueTypeFormat extends scalaxb.XMLFormat[ValueType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ValueType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("inprocess")) => Inprocess
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("approved")) => Approved
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("published")) => Published

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ValueType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ValueType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_PublicationstatusFormat extends scalaxb.ElemNameParser[Publicationstatus] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("publicationstatus")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Publicationstatus] =
      phrase(optTextRecord ^^
      { case p1 =>
      Publicationstatus(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ValueType](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Publicationstatus, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@value", _) => attr = scala.xml.Attribute(null, "value", __obj.valueAttribute.toString, attr)
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Publicationstatus, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_LanguagedeclarationFormat extends scalaxb.ElemNameParser[Languagedeclaration] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("languagedeclaration")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Languagedeclaration] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "language")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "script")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 =>
      Languagedeclaration(scalaxb.fromXML[Language](p1, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[Script](p2, scalaxb.ElemName(node) :: stack),
        p3.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Languagedeclaration, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Languagedeclaration, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Language](__obj.language, Some("http://ead3.archivists.org/schema/"), Some("language"), __scope, false),
        scalaxb.toXML[Script](__obj.scriptElement, Some("http://ead3.archivists.org/schema/"), Some("script"), __scope, false),
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_ConventiondeclarationFormat extends scalaxb.ElemNameParser[Conventiondeclaration] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("conventiondeclaration")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Conventiondeclaration] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "citation")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 =>
      Conventiondeclaration(p1.headOption map { scalaxb.fromXML[Abbr](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Citation](p2, scalaxb.ElemName(node) :: stack),
        p3.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Conventiondeclaration, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Conventiondeclaration, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.abbr map { scalaxb.toXML[Abbr](_, Some("http://ead3.archivists.org/schema/"), Some("abbr"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Citation](__obj.citation, Some("http://ead3.archivists.org/schema/"), Some("citation"), __scope, false),
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_RightsdeclarationFormat extends scalaxb.ElemNameParser[Rightsdeclaration] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("rightsdeclaration")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Rightsdeclaration] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "citation")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 =>
      Rightsdeclaration(p1.headOption map { scalaxb.fromXML[Abbr](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Citation](p2, scalaxb.ElemName(node) :: stack),
        p3.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Rightsdeclaration, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Rightsdeclaration, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.abbr map { scalaxb.toXML[Abbr](_, Some("http://ead3.archivists.org/schema/"), Some("abbr"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Citation](__obj.citation, Some("http://ead3.archivists.org/schema/"), Some("citation"), __scope, false),
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_LocaltypedeclarationFormat extends scalaxb.ElemNameParser[Localtypedeclaration] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("localtypedeclaration")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Localtypedeclaration] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "citation")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 =>
      Localtypedeclaration(p1.headOption map { scalaxb.fromXML[Abbr](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Citation](p2, scalaxb.ElemName(node) :: stack),
        p3.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Localtypedeclaration, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Localtypedeclaration, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.abbr map { scalaxb.toXML[Abbr](_, Some("http://ead3.archivists.org/schema/"), Some("abbr"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Citation](__obj.citation, Some("http://ead3.archivists.org/schema/"), Some("citation"), __scope, false),
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_LocalcontrolFormat extends scalaxb.ElemNameParser[Localcontrol] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("localcontrol")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Localcontrol] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "term")) ~ 
      opt(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "datesingle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Datesingle](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daterange")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daterange](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Localcontrol(p1.headOption map { scalaxb.fromXML[Term](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Localcontrol, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Localcontrol, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.term map { scalaxb.toXML[Term](_, Some("http://ead3.archivists.org/schema/"), Some("term"), __scope, false) } getOrElse {Nil},
        __obj.localcontroloption map { x => scalaxb.toXML[scalaxb.DataRecord[LocalcontrolOption]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_TermFormat extends scalaxb.ElemNameParser[Term] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("term")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Term] =
      phrase(optTextRecord ^^
      { case p1 =>
      Term(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@transliteration").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@transliteration" -> _ },
        (node \ "@lastdatetimeverified").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lastdatetimeverified" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Term, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@transliteration", _) => __obj.transliteration foreach { x => attr = scala.xml.Attribute(null, "transliteration", x.toString, attr) }
        case ("@lastdatetimeverified", _) => __obj.lastdatetimeverified foreach { x => attr = scala.xml.Attribute(null, "lastdatetimeverified", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Term, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_MaintenancehistoryFormat extends scalaxb.ElemNameParser[Maintenancehistory] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("maintenancehistory")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Maintenancehistory] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "maintenanceevent")) ^^
      { case p1 =>
      Maintenancehistory(p1 map { scalaxb.fromXML[Maintenanceevent](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Maintenancehistory, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Maintenancehistory, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.maintenanceevent flatMap { scalaxb.toXML[Maintenanceevent](_, Some("http://ead3.archivists.org/schema/"), Some("maintenanceevent"), __scope, false) })

  }

  trait DefaultGenerated_MaintenanceeventFormat extends scalaxb.ElemNameParser[Maintenanceevent] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("maintenanceevent")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Maintenanceevent] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "eventtype")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "eventdatetime")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "agenttype")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "agent")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "eventdescription")) ^^
      { case p1 ~ p2 ~ p3 ~ p4 ~ p5 =>
      Maintenanceevent(scalaxb.fromXML[Eventtype](p1, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[Eventdatetime](p2, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[Agenttype](p3, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[Agent](p4, scalaxb.ElemName(node) :: stack),
        p5 map { scalaxb.fromXML[Eventdescription](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Maintenanceevent, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Maintenanceevent, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Eventtype](__obj.eventtype, Some("http://ead3.archivists.org/schema/"), Some("eventtype"), __scope, false),
        scalaxb.toXML[Eventdatetime](__obj.eventdatetime, Some("http://ead3.archivists.org/schema/"), Some("eventdatetime"), __scope, false),
        scalaxb.toXML[Agenttype](__obj.agenttype, Some("http://ead3.archivists.org/schema/"), Some("agenttype"), __scope, false),
        scalaxb.toXML[Agent](__obj.agent, Some("http://ead3.archivists.org/schema/"), Some("agent"), __scope, false),
        __obj.eventdescription flatMap { scalaxb.toXML[Eventdescription](_, Some("http://ead3.archivists.org/schema/"), Some("eventdescription"), __scope, false) })

  }

  def buildGenerated_ValueType2Format = new DefaultGenerated_ValueType2Format {}
  trait DefaultGenerated_ValueType2Format extends scalaxb.XMLFormat[ValueType2] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ValueType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("created")) => Created
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("revised")) => RevisedValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("deleted")) => DeletedValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("cancelled")) => CancelledValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("derived")) => DerivedValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("updated")) => Updated
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("unknown")) => Unknown

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ValueType2] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ValueType2, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_EventtypeFormat extends scalaxb.ElemNameParser[Eventtype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("eventtype")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Eventtype] =
      phrase(optTextRecord ^^
      { case p1 =>
      Eventtype(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ValueType2](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Eventtype, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@value", _) => attr = scala.xml.Attribute(null, "value", __obj.valueAttribute.toString, attr)
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Eventtype, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_EventdatetimeFormat extends scalaxb.ElemNameParser[Eventdatetime] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("eventdatetime")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Eventdatetime] =
      phrase(optTextRecord ^^
      { case p1 =>
      Eventdatetime(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@standarddatetime").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@standarddatetime" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Eventdatetime, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@standarddatetime", _) => __obj.standarddatetime foreach { x => attr = scala.xml.Attribute(null, "standarddatetime", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Eventdatetime, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_ValueType3Format = new DefaultGenerated_ValueType3Format {}
  trait DefaultGenerated_ValueType3Format extends scalaxb.XMLFormat[ValueType3] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ValueType3 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("human")) => Human
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("machine")) => Machine
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("unknown")) => UnknownValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ValueType3] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ValueType3, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_AgenttypeFormat extends scalaxb.ElemNameParser[Agenttype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("agenttype")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Agenttype] =
      phrase(optTextRecord ^^
      { case p1 =>
      Agenttype(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ValueType3](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Agenttype, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@value", _) => attr = scala.xml.Attribute(null, "value", __obj.valueAttribute.toString, attr)
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Agenttype, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_AgentFormat extends scalaxb.ElemNameParser[Agent] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("agent")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Agent] =
      phrase(optTextRecord ^^
      { case p1 =>
      Agent(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Agent, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Agent, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_EventdescriptionFormat extends scalaxb.ElemNameParser[Eventdescription] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("eventdescription")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Eventdescription] =
      phrase(optTextRecord ^^
      { case p1 =>
      Eventdescription(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Eventdescription, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Eventdescription, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_SourcesFormat extends scalaxb.ElemNameParser[Sources] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("sources")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Sources] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "source")) ^^
      { case p1 =>
      Sources(p1 map { scalaxb.fromXML[Source](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Sources, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Sources, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.source flatMap { scalaxb.toXML[Source](_, Some("http://ead3.archivists.org/schema/"), Some("source"), __scope, false) })

  }

  trait DefaultGenerated_SourceFormat extends scalaxb.ElemNameParser[Source] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("source")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Source] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "sourceentry")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "objectxmlwrap")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 =>
      Source(p1 map { scalaxb.fromXML[Sourceentry](_, scalaxb.ElemName(node) :: stack) },
        p2.headOption map { scalaxb.fromXML[Objectxmlwrap](_, scalaxb.ElemName(node) :: stack) },
        p3.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@lastdatetimeverified").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lastdatetimeverified" -> _ },
        (node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ },
        (node \ "@linkrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@linkrole" -> _ },
        (node \ "@arcrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@arcrole" -> _ },
        (node \ "@linktitle").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@linktitle" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ShowType](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ActuateType](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Source, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@lastdatetimeverified", _) => __obj.lastdatetimeverified foreach { x => attr = scala.xml.Attribute(null, "lastdatetimeverified", x.toString, attr) }
        case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
        case ("@linkrole", _) => __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
        case ("@arcrole", _) => __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
        case ("@linktitle", _) => __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Source, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.sourceentry flatMap { scalaxb.toXML[Sourceentry](_, Some("http://ead3.archivists.org/schema/"), Some("sourceentry"), __scope, false) },
        __obj.objectxmlwrap map { scalaxb.toXML[Objectxmlwrap](_, Some("http://ead3.archivists.org/schema/"), Some("objectxmlwrap"), __scope, false) } getOrElse {Nil},
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_SourceentryFormat extends scalaxb.ElemNameParser[Sourceentry] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("sourceentry")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Sourceentry] =
      phrase(optTextRecord ^^
      { case p1 =>
      Sourceentry(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@transliteration").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@transliteration" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Sourceentry, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@transliteration", _) => __obj.transliteration foreach { x => attr = scala.xml.Attribute(null, "transliteration", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Sourceentry, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_RenderFormat = new DefaultGenerated_RenderFormat {}
  trait DefaultGenerated_RenderFormat extends scalaxb.XMLFormat[Render] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Render = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("altrender")) => Altrender
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bold")) => Bold
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolddoublequote")) => Bolddoublequote
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolditalic")) => Bolditalic
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsinglequote")) => Boldsinglequote
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsmcaps")) => Boldsmcaps
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldunderline")) => Boldunderline
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("doublequote")) => Doublequote
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("italic")) => Italic
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nonproport")) => Nonproport
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("singlequote")) => Singlequote
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("smcaps")) => Smcaps
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("sub")) => Sub
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("super")) => Super
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("underline")) => Underline

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Render] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Render, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_TitleproperFormat extends scalaxb.ElemNameParser[Titleproper] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("titleproper")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Titleproper] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Titleproper(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@render").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Render](x, scalaxb.ElemName(node) :: stack)) } map { "@render" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Titleproper, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@render", _) => __obj.render foreach { x => attr = scala.xml.Attribute(null, "render", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Titleproper, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_SubtitleFormat extends scalaxb.ElemNameParser[Subtitle] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("subtitle")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Subtitle] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Subtitle(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Subtitle, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Subtitle, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_AuthorFormat extends scalaxb.ElemNameParser[Author] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("author")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Author] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Author(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Author, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Author, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_SponsorFormat extends scalaxb.ElemNameParser[Sponsor] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("sponsor")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Sponsor] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Sponsor(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Sponsor, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Sponsor, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_EditionFormat extends scalaxb.ElemNameParser[Edition] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("edition")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Edition] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Edition(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Edition, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Edition, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_PublisherFormat extends scalaxb.ElemNameParser[Publisher] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("publisher")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Publisher] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Publisher(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Publisher, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Publisher, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ControlnoteFormat extends scalaxb.ElemNameParser[Controlnote] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("controlnote")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Controlnote] =
      phrase(safeRep(parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack)) ^^
      { case p1 =>
      Controlnote(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Controlnote, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Controlnote, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.mu46blocksOption1 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_MaintenanceagencyFormat extends scalaxb.ElemNameParser[Maintenanceagency] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("maintenanceagency")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Maintenanceagency] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "agencycode")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "otheragencycode")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "agencyname")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      Maintenanceagency(p1.headOption map { scalaxb.fromXML[Agencycode](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Otheragencycode](_, scalaxb.ElemName(node) :: stack) },
        p3 map { scalaxb.fromXML[Agencyname](_, scalaxb.ElemName(node) :: stack) },
        p4.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@countrycode").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@countrycode" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Maintenanceagency, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@countrycode", _) => __obj.countrycode foreach { x => attr = scala.xml.Attribute(null, "countrycode", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Maintenanceagency, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.agencycode map { scalaxb.toXML[Agencycode](_, Some("http://ead3.archivists.org/schema/"), Some("agencycode"), __scope, false) } getOrElse {Nil},
        __obj.otheragencycode flatMap { scalaxb.toXML[Otheragencycode](_, Some("http://ead3.archivists.org/schema/"), Some("otheragencycode"), __scope, false) },
        __obj.agencyname flatMap { scalaxb.toXML[Agencyname](_, Some("http://ead3.archivists.org/schema/"), Some("agencyname"), __scope, false) },
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_AgencycodeFormat extends scalaxb.ElemNameParser[Agencycode] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("agencycode")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Agencycode] =
      phrase(optTextRecord ^^
      { case p1 =>
      Agencycode(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Agencycode, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Agencycode, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_OtheragencycodeFormat extends scalaxb.ElemNameParser[Otheragencycode] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("otheragencycode")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Otheragencycode] =
      phrase(optTextRecord ^^
      { case p1 =>
      Otheragencycode(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Otheragencycode, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Otheragencycode, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_AgencynameFormat extends scalaxb.ElemNameParser[Agencyname] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("agencyname")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Agencyname] =
      phrase(optTextRecord ^^
      { case p1 =>
      Agencyname(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Agencyname, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Agencyname, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_CitationFormat extends scalaxb.ElemNameParser[Citation] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("citation")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Citation] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Citation(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ },
        (node \ "@linkrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@linkrole" -> _ },
        (node \ "@arcrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@arcrole" -> _ },
        (node \ "@linktitle").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@linktitle" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ShowType](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ActuateType](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ },
        (node \ "@lastdatetimeverified").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lastdatetimeverified" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Citation, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
        case ("@linkrole", _) => __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
        case ("@arcrole", _) => __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
        case ("@linktitle", _) => __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case ("@lastdatetimeverified", _) => __obj.lastdatetimeverified foreach { x => attr = scala.xml.Attribute(null, "lastdatetimeverified", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Citation, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ArchdescFormat extends scalaxb.ElemNameParser[ArchDescription] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("archdesc")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[ArchDescription] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep((parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dsc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dsc](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      ArchDescription(scalaxb.fromXML[Did](p1, scalaxb.ElemName(node) :: stack),
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@relatedencoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relatedencoding" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[LevelType](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: ArchDescription, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@relatedencoding", _) => __obj.relatedencoding foreach { x => attr = scala.xml.Attribute(null, "relatedencoding", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@level", _) => attr = scala.xml.Attribute(null, "level", __obj.level.toString, attr)
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: ArchDescription, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.archdescoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_DidFormat extends scalaxb.ElemNameParser[Did] with Generated_Mu46didGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("did")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Did] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep(parseMu46didGroup(node, scalaxb.ElemName(node) :: stack)) ^^
      { case p1 ~ p2 =>
      Did(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Did, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Did, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.mu46didOption2 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46didOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_AbstractFormat extends scalaxb.ElemNameParser[Abstract] with Generated_Mu46mixedu46basicu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("abstract")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Abstract] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Abstract(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Abstract, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Abstract, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ContainerFormat extends scalaxb.ElemNameParser[Container] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("container")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Container] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Container(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@parent").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Seq[String]](x, scalaxb.ElemName(node) :: stack)) } map { "@parent" -> _ },
        (node \ "@containerid").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@containerid" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Container, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@parent", _) => __obj.parent foreach { x => attr = scala.xml.Attribute(null, "parent", x.toString, attr) }
        case ("@containerid", _) => __obj.containerid foreach { x => attr = scala.xml.Attribute(null, "containerid", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Container, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_DaotypeFormat = new DefaultGenerated_DaotypeFormat {}
  trait DefaultGenerated_DaotypeFormat extends scalaxb.XMLFormat[Daotype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Daotype = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("borndigital")) => Borndigital
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("derived")) => DerivedValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("unknown")) => UnknownValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherdaotype")) => Otherdaotype

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Daotype] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Daotype, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_CoverageFormat = new DefaultGenerated_CoverageFormat {}
  trait DefaultGenerated_CoverageFormat extends scalaxb.XMLFormat[Coverage] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Coverage = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("whole")) => Whole
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("part")) => PartValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Coverage] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Coverage, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_DaoFormat extends scalaxb.ElemNameParser[Dao] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("dao")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dao] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 =>
      Dao(p1.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ },
        (node \ "@linkrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@linkrole" -> _ },
        (node \ "@arcrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@arcrole" -> _ },
        (node \ "@linktitle").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@linktitle" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ShowType](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ActuateType](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@xpointer").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@xpointer" -> _ },
        (node \ "@entityref").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@entityref" -> _ },
        (node \ "@daotype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Daotype](x, scalaxb.ElemName(node) :: stack)) } map { "@daotype" -> _ },
        (node \ "@otherdaotype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherdaotype" -> _ },
        (node \ "@coverage").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Coverage](x, scalaxb.ElemName(node) :: stack)) } map { "@coverage" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Dao, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
        case ("@linkrole", _) => __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
        case ("@arcrole", _) => __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
        case ("@linktitle", _) => __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@xpointer", _) => __obj.xpointer foreach { x => attr = scala.xml.Attribute(null, "xpointer", x.toString, attr) }
        case ("@entityref", _) => __obj.entityref foreach { x => attr = scala.xml.Attribute(null, "entityref", x.toString, attr) }
        case ("@daotype", _) => attr = scala.xml.Attribute(null, "daotype", __obj.daotype.toString, attr)
        case ("@otherdaotype", _) => __obj.otherdaotype foreach { x => attr = scala.xml.Attribute(null, "otherdaotype", x.toString, attr) }
        case ("@coverage", _) => __obj.coverage foreach { x => attr = scala.xml.Attribute(null, "coverage", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Dao, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  def buildGenerated_CoverageTypeFormat = new DefaultGenerated_CoverageTypeFormat {}
  trait DefaultGenerated_CoverageTypeFormat extends scalaxb.XMLFormat[CoverageType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): CoverageType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("whole")) => WholeValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("part")) => PartValue2

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, CoverageType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: CoverageType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_DaosetFormat extends scalaxb.ElemNameParser[Daoset] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("daoset")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Daoset] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dao")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dao")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 =>
      Daoset(scalaxb.fromXML[Dao](p1, scalaxb.ElemName(node) :: stack),
        p2 map { scalaxb.fromXML[Dao](_, scalaxb.ElemName(node) :: stack) },
        p3.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@coverage").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[CoverageType](x, scalaxb.ElemName(node) :: stack)) } map { "@coverage" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Daoset, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@coverage", _) => __obj.coverage foreach { x => attr = scala.xml.Attribute(null, "coverage", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Daoset, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Dao](__obj.daoFirst, Some("http://ead3.archivists.org/schema/"), Some("dao"), __scope, false),
        __obj.daoOthers flatMap { scalaxb.toXML[Dao](_, Some("http://ead3.archivists.org/schema/"), Some("dao"), __scope, false) },
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_DidnoteFormat extends scalaxb.ElemNameParser[Didnote] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("didnote")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Didnote] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Didnote(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Didnote, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Didnote, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_LangmaterialFormat extends scalaxb.ElemNameParser[Langmaterial] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("langmaterial")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Langmaterial] =
      phrase(safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "language")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Language](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "languageset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Languageset](x, scalaxb.ElemName(node) :: stack))))) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 =>
      Langmaterial(p1,
        p2.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Langmaterial, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Langmaterial, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.langmaterialoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[LangmaterialOption]](x, x.namespace, x.key, __scope, false) },
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_MaterialspecFormat extends scalaxb.ElemNameParser[Materialspec] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("materialspec")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Materialspec] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Materialspec(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Materialspec, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Materialspec, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_CoverageType2Format = new DefaultGenerated_CoverageType2Format {}
  trait DefaultGenerated_CoverageType2Format extends scalaxb.XMLFormat[CoverageType2] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): CoverageType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("whole")) => WholeValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("part")) => PartValue3

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, CoverageType2] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: CoverageType2, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_PhysdescsetFormat extends scalaxb.ElemNameParser[Physdescset] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("physdescset")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Physdescset] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescstructured")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescstructured")) ^^
      { case p1 ~ p2 =>
      Physdescset(scalaxb.fromXML[Physdescstructured](p1, scalaxb.ElemName(node) :: stack),
        p2 map { scalaxb.fromXML[Physdescstructured](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@parallel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@parallel" -> _ },
        (node \ "@coverage").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[CoverageType2](x, scalaxb.ElemName(node) :: stack)) } map { "@coverage" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Physdescset, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@parallel", _) => __obj.parallel foreach { x => attr = scala.xml.Attribute(null, "parallel", x.toString, attr) }
        case ("@coverage", _) => __obj.coverage foreach { x => attr = scala.xml.Attribute(null, "coverage", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Physdescset, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Physdescstructured](__obj.physdescstructuredFirst, Some("http://ead3.archivists.org/schema/"), Some("physdescstructured"), __scope, false),
        __obj.physdescstructuredOthers flatMap { scalaxb.toXML[Physdescstructured](_, Some("http://ead3.archivists.org/schema/"), Some("physdescstructured"), __scope, false) })

  }

  trait DefaultGenerated_PhysdescFormat extends scalaxb.ElemNameParser[Physdesc] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("physdesc")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Physdesc] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Physdesc(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Physdesc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Physdesc, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_PhyslocFormat extends scalaxb.ElemNameParser[Physloc] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("physloc")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Physloc] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Physloc(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@parent").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Seq[String]](x, scalaxb.ElemName(node) :: stack)) } map { "@parent" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Physloc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@parent", _) => __obj.parent foreach { x => attr = scala.xml.Attribute(null, "parent", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Physloc, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_OriginationFormat extends scalaxb.ElemNameParser[Origination] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("origination")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Origination] =
      phrase(safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "corpname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Corpname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "famname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Famname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "name")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Name](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "persname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Persname](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 =>
      Origination(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Origination, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Origination, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.originationoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[OriginationOption]](x, x.namespace, x.key, __scope, false) })

  }

  def buildGenerated_PhysdescstructuredtypeFormat = new DefaultGenerated_PhysdescstructuredtypeFormat {}
  trait DefaultGenerated_PhysdescstructuredtypeFormat extends scalaxb.XMLFormat[Physdescstructuredtype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Physdescstructuredtype = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("carrier")) => Carrier
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("materialtype")) => Materialtype
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("spaceoccupied")) => Spaceoccupied
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherphysdescstructuredtype")) => Otherphysdescstructuredtype

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Physdescstructuredtype] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Physdescstructuredtype, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_PhysdescstructuredFormat extends scalaxb.ElemNameParser[Physdescstructured] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("physdescstructured")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Physdescstructured] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quantity")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unittype")) ~ 
      safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physfacet")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physfacet](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dimensions")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dimensions](x, scalaxb.ElemName(node) :: stack))))) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      Physdescstructured(scalaxb.fromXML[Quantity](p1, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[Unittype](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@physdescstructuredtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Physdescstructuredtype](x, scalaxb.ElemName(node) :: stack)) } map { "@physdescstructuredtype" -> _ },
        (node \ "@otherphysdescstructuredtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherphysdescstructuredtype" -> _ },
        (node \ "@coverage").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[CoverageType3](x, scalaxb.ElemName(node) :: stack)) } map { "@coverage" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Physdescstructured, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@physdescstructuredtype", _) => attr = scala.xml.Attribute(null, "physdescstructuredtype", __obj.physdescstructuredtype.toString, attr)
        case ("@otherphysdescstructuredtype", _) => __obj.otherphysdescstructuredtype foreach { x => attr = scala.xml.Attribute(null, "otherphysdescstructuredtype", x.toString, attr) }
        case ("@coverage", _) => attr = scala.xml.Attribute(null, "coverage", __obj.coverage.toString, attr)
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Physdescstructured, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Quantity](__obj.quantity, Some("http://ead3.archivists.org/schema/"), Some("quantity"), __scope, false),
        scalaxb.toXML[Unittype](__obj.unittype, Some("http://ead3.archivists.org/schema/"), Some("unittype"), __scope, false),
        __obj.physdescstructuredoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[PhysdescstructuredOption]](x, x.namespace, x.key, __scope, false) },
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_QuantityFormat extends scalaxb.ElemNameParser[Quantity] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("quantity")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Quantity] =
      phrase(optTextRecord ^^
      { case p1 =>
      Quantity(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@approximate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@approximate" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Quantity, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@approximate", _) => __obj.approximate foreach { x => attr = scala.xml.Attribute(null, "approximate", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Quantity, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_UnittypeFormat extends scalaxb.ElemNameParser[Unittype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("unittype")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Unittype] =
      phrase(optTextRecord ^^
      { case p1 =>
      Unittype(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Unittype, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Unittype, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_RepositoryFormat extends scalaxb.ElemNameParser[Repository] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("repository")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Repository] =
      phrase(safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "corpname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Corpname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "famname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Famname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "name")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Name](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "persname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Persname](x, scalaxb.ElemName(node) :: stack))))) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "address")) ^^
      { case p1 ~ p2 =>
      Repository(p1,
        p2.headOption map { scalaxb.fromXML[Address](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Repository, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Repository, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.repositoryoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[RepositoryOption]](x, x.namespace, x.key, __scope, false) },
        __obj.address map { scalaxb.toXML[Address](_, Some("http://ead3.archivists.org/schema/"), Some("address"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_UnitdateFormat extends scalaxb.ElemNameParser[Unitdate] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("unitdate")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Unitdate] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Unitdate(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@unitdatetype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Unitdatetype](x, scalaxb.ElemName(node) :: stack)) } map { "@unitdatetype" -> _ },
        (node \ "@datechar").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@datechar" -> _ },
        (node \ "@certainty").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@certainty" -> _ },
        (node \ "@era").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@era" -> _ },
        (node \ "@calendar").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@calendar" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Unitdate, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@unitdatetype", _) => __obj.unitdatetype foreach { x => attr = scala.xml.Attribute(null, "unitdatetype", x.toString, attr) }
        case ("@datechar", _) => __obj.datechar foreach { x => attr = scala.xml.Attribute(null, "datechar", x.toString, attr) }
        case ("@certainty", _) => __obj.certainty foreach { x => attr = scala.xml.Attribute(null, "certainty", x.toString, attr) }
        case ("@era", _) => __obj.era foreach { x => attr = scala.xml.Attribute(null, "era", x.toString, attr) }
        case ("@calendar", _) => __obj.calendar foreach { x => attr = scala.xml.Attribute(null, "calendar", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Unitdate, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_UnitdatestructuredFormat extends scalaxb.ElemNameParser[Unitdatestructured] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("unitdatestructured")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Unitdatestructured] =
      phrase((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "datesingle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Datesingle](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daterange")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daterange](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dateset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dateset](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 =>
      Unitdatestructured(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@unitdatetype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Unitdatetype](x, scalaxb.ElemName(node) :: stack)) } map { "@unitdatetype" -> _ },
        (node \ "@datechar").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@datechar" -> _ },
        (node \ "@certainty").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@certainty" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@era").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@era" -> _ },
        (node \ "@calendar").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@calendar" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Unitdatestructured, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@unitdatetype", _) => __obj.unitdatetype foreach { x => attr = scala.xml.Attribute(null, "unitdatetype", x.toString, attr) }
        case ("@datechar", _) => __obj.datechar foreach { x => attr = scala.xml.Attribute(null, "datechar", x.toString, attr) }
        case ("@certainty", _) => __obj.certainty foreach { x => attr = scala.xml.Attribute(null, "certainty", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@era", _) => __obj.era foreach { x => attr = scala.xml.Attribute(null, "era", x.toString, attr) }
        case ("@calendar", _) => __obj.calendar foreach { x => attr = scala.xml.Attribute(null, "calendar", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Unitdatestructured, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      ((Some(__obj.unitdatestructuredoption) map {x => scalaxb.toXML[scalaxb.DataRecord[UnitdatestructuredOption]](x, x.namespace, x.key, __scope, false)}).get)

  }

  trait DefaultGenerated_UnittitleFormat extends scalaxb.ElemNameParser[Unittitle] with Generated_Mu46mixedu46basicu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("unittitle")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Unittitle] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Unittitle(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Unittitle, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Unittitle, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_UnitidFormat extends scalaxb.ElemNameParser[Unitid] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("unitid")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Unitid] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Unitid(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@countrycode").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@countrycode" -> _ },
        (node \ "@repositorycode").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@repositorycode" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Unitid, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@countrycode", _) => __obj.countrycode foreach { x => attr = scala.xml.Attribute(null, "countrycode", x.toString, attr) }
        case ("@repositorycode", _) => __obj.repositorycode foreach { x => attr = scala.xml.Attribute(null, "repositorycode", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Unitid, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_AccessrestrictFormat extends scalaxb.ElemNameParser[Accessrestrict] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("accessrestrict")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Accessrestrict] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accessrestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accessrestrict](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Accessrestrict(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Accessrestrict, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Accessrestrict, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.accessrestrictoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_AccrualsFormat extends scalaxb.ElemNameParser[Accruals] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("accruals")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Accruals] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accruals")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accruals](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Accruals(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Accruals, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Accruals, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.accrualsoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_AcqinfoFormat extends scalaxb.ElemNameParser[Acqinfo] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("acqinfo")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Acqinfo] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "acqinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Acqinfo](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Acqinfo(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Acqinfo, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Acqinfo, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.acqinfooption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_AltformavailFormat extends scalaxb.ElemNameParser[Altformavail] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("altformavail")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Altformavail] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "altformavail")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Altformavail](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Altformavail(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Altformavail, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Altformavail, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.altformavailoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_AppraisalFormat extends scalaxb.ElemNameParser[Appraisal] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("appraisal")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Appraisal] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "appraisal")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Appraisal](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Appraisal(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Appraisal, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Appraisal, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.appraisaloption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_ArrangementFormat extends scalaxb.ElemNameParser[Arrangement] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("arrangement")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Arrangement] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "arrangement")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Arrangement](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Arrangement(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Arrangement, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Arrangement, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.arrangementoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_BibliographyFormat extends scalaxb.ElemNameParser[Bibliography] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("bibliography")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Bibliography] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibliography")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibliography](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "archref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Archref](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibref](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Bibliography(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Bibliography, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Bibliography, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.bibliographyoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_BioghistFormat extends scalaxb.ElemNameParser[Bioghist] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("bioghist")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Bioghist] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bioghist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bioghist](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Bioghist(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Bioghist, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Bioghist, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.bioghistoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_ControlaccessFormat extends scalaxb.ElemNameParser[Controlaccess] with Generated_Mu46blocksGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("controlaccess")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Controlaccess] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      (parseMu46accessGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "controlaccess")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Controlaccess](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Controlaccess(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Controlaccess, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Controlaccess, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.controlaccessoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_CustodhistFormat extends scalaxb.ElemNameParser[Custodhist] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("custodhist")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Custodhist] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "custodhist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Custodhist](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Custodhist(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Custodhist, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Custodhist, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.custodhistoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_FileplanFormat extends scalaxb.ElemNameParser[Fileplan] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("fileplan")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Fileplan] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "fileplan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fileplan](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Fileplan(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Fileplan, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Fileplan, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.fileplanoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_IndexFormat extends scalaxb.ElemNameParser[Index] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("index")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Index] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep(parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep(((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "listhead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "indexentry"))) ^^ 
        { case p1 ~ p2 => scalaxb.DataRecord(IndexSequence1(p1.headOption map { scalaxb.fromXML[Listhead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Indexentry](_, scalaxb.ElemName(node) :: stack) })) }) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "index")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Index](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 ~ p3 =>
      Index(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        p3,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Index, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Index, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.mu46blocksOption2 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) },
        __obj.indexoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[IndexOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_IndexSequence1Format extends scalaxb.XMLFormat[IndexSequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, IndexSequence1] = Left("don't call me.")
    
    def writes(__obj: IndexSequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.listhead map { scalaxb.toXML[Listhead](_, Some("http://ead3.archivists.org/schema/"), Some("listhead"), __scope, false) } getOrElse {Nil},
        __obj.indexentry flatMap { scalaxb.toXML[Indexentry](_, Some("http://ead3.archivists.org/schema/"), Some("indexentry"), __scope, false) })


  }

  trait DefaultGenerated_IndexentryFormat extends scalaxb.ElemNameParser[Indexentry] with Generated_Mu46accessGroupFormat with Generated_Mu46refsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("indexentry")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Indexentry] =
      phrase((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "namegrp")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Namegrp](x, scalaxb.ElemName(node) :: stack)))) ||| 
      (parseMu46accessGroup(node, scalaxb.ElemName(node) :: stack, true))) ~ 
      opt(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptrgrp")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptrgrp](x, scalaxb.ElemName(node) :: stack)))) ||| 
      (parseMu46refsGroup(node, scalaxb.ElemName(node) :: stack, true))) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "indexentry")) ^^
      { case p1 ~ p2 ~ p3 =>
      Indexentry(p1,
        p2,
        p3 map { scalaxb.fromXML[Indexentry](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Indexentry, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Indexentry, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat((Some(__obj.indexentryoption) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false)}).get,
        __obj.indexentryoption2 map { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil},
        __obj.indexentry flatMap { scalaxb.toXML[Indexentry](_, Some("http://ead3.archivists.org/schema/"), Some("indexentry"), __scope, false) })

  }

  trait DefaultGenerated_NamegrpFormat extends scalaxb.ElemNameParser[Namegrp] with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("namegrp")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Namegrp] =
      phrase(safeRep(parseMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ^^
      { case p1 =>
      Namegrp(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Namegrp, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Namegrp, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.mu46accessOption1 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46accessOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_PtrgrpFormat extends scalaxb.ElemNameParser[Ptrgrp] with Generated_Mu46refsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("ptrgrp")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Ptrgrp] =
      phrase(safeRep(parseMu46refsGroup(node, scalaxb.ElemName(node) :: stack)) ^^
      { case p1 =>
      Ptrgrp(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Ptrgrp, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Ptrgrp, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.mu46refsOption1 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46refsOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_LegalstatusFormat extends scalaxb.ElemNameParser[Legalstatus] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("legalstatus")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Legalstatus] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "legalstatus")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Legalstatus](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Legalstatus(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Legalstatus, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Legalstatus, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.legalstatusoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_OddFormat extends scalaxb.ElemNameParser[Odd] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("odd")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Odd] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "odd")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Odd](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Odd(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Odd, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Odd, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.oddoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_OriginalslocFormat extends scalaxb.ElemNameParser[Originalsloc] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("originalsloc")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Originalsloc] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "originalsloc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Originalsloc](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Originalsloc(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Originalsloc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Originalsloc, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.originalslocoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_OtherfindaidFormat extends scalaxb.ElemNameParser[Otherfindaid] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("otherfindaid")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Otherfindaid] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "otherfindaid")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Otherfindaid](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "archref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Archref](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibref](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Otherfindaid(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Otherfindaid, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Otherfindaid, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.otherfindaidoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_PhystechFormat extends scalaxb.ElemNameParser[Phystech] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("phystech")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Phystech] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "phystech")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Phystech](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Phystech(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Phystech, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Phystech, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.phystechoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_PreferciteFormat extends scalaxb.ElemNameParser[Prefercite] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("prefercite")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Prefercite] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "prefercite")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Prefercite](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Prefercite(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Prefercite, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Prefercite, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.preferciteoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_ProcessinfoFormat extends scalaxb.ElemNameParser[Processinfo] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("processinfo")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Processinfo] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "processinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Processinfo](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Processinfo(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Processinfo, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Processinfo, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.processinfooption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_RelatedmaterialFormat extends scalaxb.ElemNameParser[Relatedmaterial] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("relatedmaterial")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Relatedmaterial] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Relatedmaterial](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "archref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Archref](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibref](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Relatedmaterial(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Relatedmaterial, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Relatedmaterial, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.relatedmaterialoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_ScopecontentFormat extends scalaxb.ElemNameParser[Scopecontent] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("scopecontent")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Scopecontent] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "scopecontent")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Scopecontent](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Scopecontent(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Scopecontent, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Scopecontent, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.scopecontentoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_SeparatedmaterialFormat extends scalaxb.ElemNameParser[Separatedmaterial] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("separatedmaterial")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Separatedmaterial] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "separatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Separatedmaterial](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "archref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Archref](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibref](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Separatedmaterial(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Separatedmaterial, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Separatedmaterial, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.separatedmaterialoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_UserestrictFormat extends scalaxb.ElemNameParser[Userestrict] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("userestrict")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Userestrict] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep((parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "userestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Userestrict](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Userestrict(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Userestrict, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Userestrict, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.userestrictoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_CorpnameFormat extends scalaxb.ElemNameParser[Corpname] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("corpname")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Corpname] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Corpname(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Corpname, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Corpname, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_FamnameFormat extends scalaxb.ElemNameParser[Famname] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("famname")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Famname] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Famname(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Famname, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Famname, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_FunctionTypeFormat extends scalaxb.ElemNameParser[FunctionType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("function")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[FunctionType] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      FunctionType(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: FunctionType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: FunctionType, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_GenreformFormat extends scalaxb.ElemNameParser[Genreform] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("genreform")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Genreform] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Genreform(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Genreform, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Genreform, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_GeognameFormat extends scalaxb.ElemNameParser[Geogname] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("geogname")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Geogname] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "geographiccoordinates")) ^^
      { case p1 ~ p2 =>
      Geogname(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Geographiccoordinates](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Geogname, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Geogname, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) },
        __obj.geographiccoordinates flatMap { scalaxb.toXML[Geographiccoordinates](_, Some("http://ead3.archivists.org/schema/"), Some("geographiccoordinates"), __scope, false) })

  }

  trait DefaultGenerated_GeographiccoordinatesFormat extends scalaxb.ElemNameParser[Geographiccoordinates] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("geographiccoordinates")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Geographiccoordinates] =
      phrase(optTextRecord ^^
      { case p1 =>
      Geographiccoordinates(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@coordinatesystem").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@coordinatesystem" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Geographiccoordinates, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@coordinatesystem", _) => attr = scala.xml.Attribute(null, "coordinatesystem", __obj.coordinatesystem.toString, attr)
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Geographiccoordinates, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_NameFormat extends scalaxb.ElemNameParser[Name] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("name")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Name] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Name(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Name, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Name, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_OccupationFormat extends scalaxb.ElemNameParser[Occupation] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("occupation")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Occupation] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Occupation(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Occupation, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Occupation, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_PersnameFormat extends scalaxb.ElemNameParser[Persname] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("persname")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Persname] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Persname(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Persname, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Persname, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_SubjectFormat extends scalaxb.ElemNameParser[Subject] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("subject")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Subject] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Subject(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Subject, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Subject, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  def buildGenerated_RenderTypeFormat = new DefaultGenerated_RenderTypeFormat {}
  trait DefaultGenerated_RenderTypeFormat extends scalaxb.XMLFormat[RenderType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): RenderType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("altrender")) => AltrenderValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bold")) => BoldValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolddoublequote")) => BolddoublequoteValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolditalic")) => BolditalicValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsinglequote")) => BoldsinglequoteValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsmcaps")) => BoldsmcapsValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldunderline")) => BoldunderlineValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("doublequote")) => DoublequoteValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("italic")) => ItalicValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nonproport")) => NonproportValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("singlequote")) => SinglequoteValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("smcaps")) => SmcapsValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("sub")) => SubValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("super")) => SuperValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("underline")) => UnderlineValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, RenderType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: RenderType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_TitleFormat extends scalaxb.ElemNameParser[Title] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("title")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Title] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "part")) ^^
      { case p1 =>
      Title(p1 map { scalaxb.fromXML[Part](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relator").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@relator" -> _ },
        (node \ "@render").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[RenderType](x, scalaxb.ElemName(node) :: stack)) } map { "@render" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Title, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relator", _) => __obj.relator foreach { x => attr = scala.xml.Attribute(null, "relator", x.toString, attr) }
        case ("@render", _) => __obj.render foreach { x => attr = scala.xml.Attribute(null, "render", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Title, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.part flatMap { scalaxb.toXML[Part](_, Some("http://ead3.archivists.org/schema/"), Some("part"), __scope, false) })

  }

  trait DefaultGenerated_PartFormat extends scalaxb.ElemNameParser[Part] with Generated_Mu46mixedu46basicu46dateu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("part")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Part] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46dateu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Part(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Part, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Part, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_PFormat extends scalaxb.ElemNameParser[P] with Generated_Mu46mixedu46basicu46plusu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("p")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[P] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46plusu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      P(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: P, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: P, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_BlockquoteFormat extends scalaxb.ElemNameParser[Blockquote] with Generated_Mu46interu46noquoteGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("blockquote")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Blockquote] =
      phrase(safeRep((parseMu46interu46noquoteGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 =>
      Blockquote(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Blockquote, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Blockquote, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.blockquoteoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_ChronlistFormat extends scalaxb.ElemNameParser[Chronlist] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("chronlist")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Chronlist] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "listhead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "chronitem")) ^^
      { case p1 ~ p2 ~ p3 =>
      Chronlist(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2.headOption map { scalaxb.fromXML[Listhead](_, scalaxb.ElemName(node) :: stack) },
        p3 map { scalaxb.fromXML[Chronitem](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Chronlist, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Chronlist, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.listhead map { scalaxb.toXML[Listhead](_, Some("http://ead3.archivists.org/schema/"), Some("listhead"), __scope, false) } getOrElse {Nil},
        __obj.chronitem flatMap { scalaxb.toXML[Chronitem](_, Some("http://ead3.archivists.org/schema/"), Some("chronitem"), __scope, false) })

  }

  trait DefaultGenerated_ChronitemFormat extends scalaxb.ElemNameParser[Chronitem] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("chronitem")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Chronitem] =
      phrase((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "datesingle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Datesingle](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daterange")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daterange](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dateset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dateset](x, scalaxb.ElemName(node) :: stack))))) ~ 
      safeRep(((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "geogname")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "event"))) ^^ 
        { case p1 ~ p2 => scalaxb.DataRecord(ChronitemSequence1(p1.headOption map { scalaxb.fromXML[Geogname](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Event](p2, scalaxb.ElemName(node) :: stack))) }) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "chronitemset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chronitemset](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Chronitem(p1,
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Chronitem, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Chronitem, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat((Some(__obj.chronitemoption) map {x => scalaxb.toXML[scalaxb.DataRecord[ChronitemOption]](x, x.namespace, x.key, __scope, false)}).get,
        __obj.chronitemoption2 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[ChronitemOption2]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_ChronitemSequence1Format extends scalaxb.XMLFormat[ChronitemSequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ChronitemSequence1] = Left("don't call me.")
    
    def writes(__obj: ChronitemSequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.geogname map { scalaxb.toXML[Geogname](_, Some("http://ead3.archivists.org/schema/"), Some("geogname"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Event](__obj.event, Some("http://ead3.archivists.org/schema/"), Some("event"), __scope, false))


  }

  trait DefaultGenerated_ChronitemsetFormat extends scalaxb.ElemNameParser[Chronitemset] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("chronitemset")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Chronitemset] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "geogname")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "event")) ^^
      { case p1 ~ p2 =>
      Chronitemset(p1 map { scalaxb.fromXML[Geogname](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Event](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Chronitemset, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Chronitemset, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.geogname flatMap { scalaxb.toXML[Geogname](_, Some("http://ead3.archivists.org/schema/"), Some("geogname"), __scope, false) },
        __obj.event flatMap { scalaxb.toXML[Event](_, Some("http://ead3.archivists.org/schema/"), Some("event"), __scope, false) })

  }

  trait DefaultGenerated_EventFormat extends scalaxb.ElemNameParser[Event] with Generated_Mu46mixedu46basicu46plusu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("event")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Event] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46plusu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Event(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Event, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Event, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_ListtypeTypeFormat = new DefaultGenerated_ListtypeTypeFormat {}
  trait DefaultGenerated_ListtypeTypeFormat extends scalaxb.XMLFormat[ListtypeType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ListtypeType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("deflist")) => Deflist
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("unordered")) => Unordered
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("ordered")) => Ordered

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ListtypeType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ListtypeType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_MarkFormat = new DefaultGenerated_MarkFormat {}
  trait DefaultGenerated_MarkFormat extends scalaxb.XMLFormat[Mark] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Mark = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("disc")) => Disc
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("circle")) => Circle
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("square")) => Square
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneType
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("inherit")) => Inherit

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Mark] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Mark, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_NumerationFormat = new DefaultGenerated_NumerationFormat {}
  trait DefaultGenerated_NumerationFormat extends scalaxb.XMLFormat[Numeration] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Numeration = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("decimal")) => Decimal
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("decimal-leading-zero")) => Decimalu45leadingu45zero
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("lower-roman")) => Loweru45roman
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("upper-roman")) => Upperu45roman
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("lower-greek")) => Loweru45greek
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("lower-latin")) => Loweru45latin
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("upper-latin")) => Upperu45latin
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("armenian")) => Armenian
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("georgian")) => Georgian
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("lower-alpha")) => Loweru45alpha
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("upper-alpha")) => Upperu45alpha
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("inherit")) => InheritValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Numeration] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Numeration, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_ListTypeFormat extends scalaxb.ElemNameParser[ListType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("list")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[ListType] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "item")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Item](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "listhead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "defitem"))) ^^ 
        { case p1 ~ p2 => scalaxb.DataRecord(ListTypeSequence1(p1.headOption map { scalaxb.fromXML[Listhead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Defitem](_, scalaxb.ElemName(node) :: stack) })) })) ^^
      { case p1 ~ p2 =>
      ListType(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@listtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ListtypeType](x, scalaxb.ElemName(node) :: stack)) } map { "@listtype" -> _ },
        (node \ "@mark").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Mark](x, scalaxb.ElemName(node) :: stack)) } map { "@mark" -> _ },
        (node \ "@numeration").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Numeration](x, scalaxb.ElemName(node) :: stack)) } map { "@numeration" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: ListType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@listtype", _) => __obj.listtype foreach { x => attr = scala.xml.Attribute(null, "listtype", x.toString, attr) }
        case ("@mark", _) => __obj.mark foreach { x => attr = scala.xml.Attribute(null, "mark", x.toString, attr) }
        case ("@numeration", _) => __obj.numeration foreach { x => attr = scala.xml.Attribute(null, "numeration", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: ListType, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.listtypeoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[ListTypeOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_ListTypeSequence1Format extends scalaxb.XMLFormat[ListTypeSequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ListTypeSequence1] = Left("don't call me.")
    
    def writes(__obj: ListTypeSequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.listhead map { scalaxb.toXML[Listhead](_, Some("http://ead3.archivists.org/schema/"), Some("listhead"), __scope, false) } getOrElse {Nil},
        __obj.defitem flatMap { scalaxb.toXML[Defitem](_, Some("http://ead3.archivists.org/schema/"), Some("defitem"), __scope, false) })


  }

  trait DefaultGenerated_DefitemFormat extends scalaxb.ElemNameParser[Defitem] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("defitem")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Defitem] =
      phrase((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "label")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "item")) ^^
      { case p1 ~ p2 =>
      Defitem(scalaxb.fromXML[Label](p1, scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[Item](p2, scalaxb.ElemName(node) :: stack),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Defitem, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Defitem, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[Label](__obj.label, Some("http://ead3.archivists.org/schema/"), Some("label"), __scope, false),
        scalaxb.toXML[Item](__obj.item, Some("http://ead3.archivists.org/schema/"), Some("item"), __scope, false))

  }

  trait DefaultGenerated_LabelFormat extends scalaxb.ElemNameParser[Label] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("label")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Label] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Label(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Label, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Label, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ItemFormat extends scalaxb.ElemNameParser[Item] with Generated_Mu46mixedu46basicu46plusu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("item")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Item] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46plusu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Item(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Item, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Item, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ListheadFormat extends scalaxb.ElemNameParser[Listhead] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("listhead")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Listhead] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head01")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head02")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head03")) ^^
      { case p1 ~ p2 ~ p3 =>
      Listhead(p1.headOption map { scalaxb.fromXML[Head01](_, scalaxb.ElemName(node) :: stack) },
        p2.headOption map { scalaxb.fromXML[Head02](_, scalaxb.ElemName(node) :: stack) },
        p3.headOption map { scalaxb.fromXML[Head03](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Listhead, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Listhead, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head01 map { scalaxb.toXML[Head01](_, Some("http://ead3.archivists.org/schema/"), Some("head01"), __scope, false) } getOrElse {Nil},
        __obj.head02 map { scalaxb.toXML[Head02](_, Some("http://ead3.archivists.org/schema/"), Some("head02"), __scope, false) } getOrElse {Nil},
        __obj.head03 map { scalaxb.toXML[Head03](_, Some("http://ead3.archivists.org/schema/"), Some("head03"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_Head01Format extends scalaxb.ElemNameParser[Head01] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("head01")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Head01] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Head01(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Head01, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Head01, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_Head02Format extends scalaxb.ElemNameParser[Head02] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("head02")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Head02] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Head02(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Head02, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Head02, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_Head03Format extends scalaxb.ElemNameParser[Head03] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("head03")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Head03] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Head03(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Head03, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Head03, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_FrameFormat = new DefaultGenerated_FrameFormat {}
  trait DefaultGenerated_FrameFormat extends scalaxb.XMLFormat[Frame] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Frame = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => Top
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => Bottom
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("topbot")) => Topbot
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("all")) => AllType
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("sides")) => Sides
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneTypeValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Frame] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Frame, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_TableFormat extends scalaxb.ElemNameParser[Table] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("table")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Table] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "tgroup")) ^^
      { case p1 ~ p2 =>
      Table(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Tgroup](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@frame").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Frame](x, scalaxb.ElemName(node) :: stack)) } map { "@frame" -> _ },
        (node \ "@colsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@colsep" -> _ },
        (node \ "@rowsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@rowsep" -> _ },
        (node \ "@pgwide").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@pgwide" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Table, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@frame", _) => __obj.frame foreach { x => attr = scala.xml.Attribute(null, "frame", x.toString, attr) }
        case ("@colsep", _) => __obj.colsep foreach { x => attr = scala.xml.Attribute(null, "colsep", x.toString, attr) }
        case ("@rowsep", _) => __obj.rowsep foreach { x => attr = scala.xml.Attribute(null, "rowsep", x.toString, attr) }
        case ("@pgwide", _) => __obj.pgwide foreach { x => attr = scala.xml.Attribute(null, "pgwide", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Table, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.tgroup flatMap { scalaxb.toXML[Tgroup](_, Some("http://ead3.archivists.org/schema/"), Some("tgroup"), __scope, false) })

  }

  def buildGenerated_AlignFormat = new DefaultGenerated_AlignFormat {}
  trait DefaultGenerated_AlignFormat extends scalaxb.XMLFormat[Align] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Align = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("left")) => LeftType
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("right")) => RightType
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("center")) => Center
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("justify")) => Justify
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("char")) => CharType

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Align] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Align, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_TgroupFormat extends scalaxb.ElemNameParser[Tgroup] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("tgroup")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Tgroup] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "colspec")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "tbody")) ^^
      { case p1 ~ p2 ~ p3 =>
      Tgroup(p1 map { scalaxb.fromXML[Colspec](_, scalaxb.ElemName(node) :: stack) },
        p2.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Tbody](p3, scalaxb.ElemName(node) :: stack),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@cols").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@cols" -> _ },
        (node \ "@colsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@colsep" -> _ },
        (node \ "@rowsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@rowsep" -> _ },
        (node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Tgroup, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@cols", _) => attr = scala.xml.Attribute(null, "cols", __obj.cols.toString, attr)
        case ("@colsep", _) => __obj.colsep foreach { x => attr = scala.xml.Attribute(null, "colsep", x.toString, attr) }
        case ("@rowsep", _) => __obj.rowsep foreach { x => attr = scala.xml.Attribute(null, "rowsep", x.toString, attr) }
        case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Tgroup, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.colspec flatMap { scalaxb.toXML[Colspec](_, Some("http://ead3.archivists.org/schema/"), Some("colspec"), __scope, false) },
        __obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Tbody](__obj.tbody, Some("http://ead3.archivists.org/schema/"), Some("tbody"), __scope, false))

  }

  def buildGenerated_AlignTypeFormat = new DefaultGenerated_AlignTypeFormat {}
  trait DefaultGenerated_AlignTypeFormat extends scalaxb.XMLFormat[AlignType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): AlignType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("left")) => LeftTypeValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("right")) => RightTypeValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("center")) => CenterValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("justify")) => JustifyValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("char")) => CharTypeValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, AlignType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: AlignType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_ColspecFormat extends scalaxb.XMLFormat[Colspec] with scalaxb.CanWriteChildNodes[Colspec] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    import scalaxb.ElemName._
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Colspec] = seq match {
      case node: scala.xml.Node => Right(Colspec(scala.collection.immutable.ListMap(List(
        (node \ "@colnum").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@colnum" -> _ },
        (node \ "@colname").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@colname" -> _ },
        (node \ "@colwidth").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@colwidth" -> _ },
        (node \ "@colsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@colsep" -> _ },
        (node \ "@rowsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@rowsep" -> _ },
        (node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[AlignType](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ },
        (node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ },
        (node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    override def writesAttribute(__obj: Colspec, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@colnum", _) => __obj.colnum foreach { x => attr = scala.xml.Attribute(null, "colnum", x.toString, attr) }
        case ("@colname", _) => __obj.colname foreach { x => attr = scala.xml.Attribute(null, "colname", x.toString, attr) }
        case ("@colwidth", _) => __obj.colwidth foreach { x => attr = scala.xml.Attribute(null, "colwidth", x.toString, attr) }
        case ("@colsep", _) => __obj.colsep foreach { x => attr = scala.xml.Attribute(null, "colsep", x.toString, attr) }
        case ("@rowsep", _) => __obj.rowsep foreach { x => attr = scala.xml.Attribute(null, "rowsep", x.toString, attr) }
        case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) }
        case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) }
        case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Colspec, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Nil


  }

  def buildGenerated_ValignFormat = new DefaultGenerated_ValignFormat {}
  trait DefaultGenerated_ValignFormat extends scalaxb.XMLFormat[Valign] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Valign = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => TopValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("middle")) => Middle
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => BottomValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Valign] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Valign, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_TbodyFormat extends scalaxb.ElemNameParser[Tbody] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("tbody")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Tbody] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "row")) ^^
      { case p1 =>
      Tbody(p1 map { scalaxb.fromXML[Row](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Tbody, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Tbody, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.row flatMap { scalaxb.toXML[Row](_, Some("http://ead3.archivists.org/schema/"), Some("row"), __scope, false) })

  }

  def buildGenerated_ValignTypeFormat = new DefaultGenerated_ValignTypeFormat {}
  trait DefaultGenerated_ValignTypeFormat extends scalaxb.XMLFormat[ValignType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ValignType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => TopValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("middle")) => MiddleValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => BottomValue2

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ValignType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ValignType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_RowFormat extends scalaxb.ElemNameParser[Row] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("row")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Row] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "entry")) ^^
      { case p1 =>
      Row(p1 map { scalaxb.fromXML[Entry](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@rowsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@rowsep" -> _ },
        (node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ValignType](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Row, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@rowsep", _) => __obj.rowsep foreach { x => attr = scala.xml.Attribute(null, "rowsep", x.toString, attr) }
        case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Row, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.entry flatMap { scalaxb.toXML[Entry](_, Some("http://ead3.archivists.org/schema/"), Some("entry"), __scope, false) })

  }

  def buildGenerated_AlignType2Format = new DefaultGenerated_AlignType2Format {}
  trait DefaultGenerated_AlignType2Format extends scalaxb.XMLFormat[AlignType2] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): AlignType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("left")) => LeftTypeValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("right")) => RightTypeValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("center")) => CenterValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("justify")) => JustifyValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("char")) => CharTypeValue2

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, AlignType2] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: AlignType2, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_ValignType2Format = new DefaultGenerated_ValignType2Format {}
  trait DefaultGenerated_ValignType2Format extends scalaxb.XMLFormat[ValignType2] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ValignType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => TopValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("middle")) => MiddleValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => BottomValue3

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ValignType2] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ValignType2, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_EntryFormat extends scalaxb.ElemNameParser[Entry] with Generated_Mu46mixedu46basicu46plusu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("entry")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Entry] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46plusu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Entry(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@colname").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@colname" -> _ },
        (node \ "@namest").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@namest" -> _ },
        (node \ "@nameend").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@nameend" -> _ },
        (node \ "@morerows").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@morerows" -> _ },
        (node \ "@colsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@colsep" -> _ },
        (node \ "@rowsep").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Avu46boolean](x, scalaxb.ElemName(node) :: stack)) } map { "@rowsep" -> _ },
        (node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[AlignType2](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ },
        (node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ },
        (node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ },
        (node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ValignType2](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Entry, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@colname", _) => __obj.colname foreach { x => attr = scala.xml.Attribute(null, "colname", x.toString, attr) }
        case ("@namest", _) => __obj.namest foreach { x => attr = scala.xml.Attribute(null, "namest", x.toString, attr) }
        case ("@nameend", _) => __obj.nameend foreach { x => attr = scala.xml.Attribute(null, "nameend", x.toString, attr) }
        case ("@morerows", _) => __obj.morerows foreach { x => attr = scala.xml.Attribute(null, "morerows", x.toString, attr) }
        case ("@colsep", _) => __obj.colsep foreach { x => attr = scala.xml.Attribute(null, "colsep", x.toString, attr) }
        case ("@rowsep", _) => __obj.rowsep foreach { x => attr = scala.xml.Attribute(null, "rowsep", x.toString, attr) }
        case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) }
        case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) }
        case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) }
        case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Entry, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_ValignType3Format = new DefaultGenerated_ValignType3Format {}
  trait DefaultGenerated_ValignType3Format extends scalaxb.XMLFormat[ValignType3] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ValignType3 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => TopValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("middle")) => MiddleValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => BottomValue4

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ValignType3] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ValignType3, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_TheadFormat extends scalaxb.ElemNameParser[Thead] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("thead")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Thead] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "row")) ^^
      { case p1 =>
      Thead(p1 map { scalaxb.fromXML[Row](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ValignType3](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Thead, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Thead, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.row flatMap { scalaxb.toXML[Row](_, Some("http://ead3.archivists.org/schema/"), Some("row"), __scope, false) })

  }

  trait DefaultGenerated_LanguageFormat extends scalaxb.ElemNameParser[Language] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("language")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Language] =
      phrase(optTextRecord ^^
      { case p1 =>
      Language(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@langcode").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@langcode" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Language, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@langcode", _) => __obj.langcode foreach { x => attr = scala.xml.Attribute(null, "langcode", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Language, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_LanguagesetFormat extends scalaxb.ElemNameParser[Languageset] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("languageset")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Languageset] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "language")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "script")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 =>
      Languageset(p1 map { scalaxb.fromXML[Language](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[Script](_, scalaxb.ElemName(node) :: stack) },
        p3.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Languageset, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Languageset, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.language flatMap { scalaxb.toXML[Language](_, Some("http://ead3.archivists.org/schema/"), Some("language"), __scope, false) },
        __obj.scriptElement flatMap { scalaxb.toXML[Script](_, Some("http://ead3.archivists.org/schema/"), Some("script"), __scope, false) },
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_ScriptFormat extends scalaxb.ElemNameParser[Script] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("script")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Script] =
      phrase(optTextRecord ^^
      { case p1 =>
      Script(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@label").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@label" -> _ },
        (node \ "@scriptcode").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@scriptcode" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Script, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@label", _) => __obj.label foreach { x => attr = scala.xml.Attribute(null, "label", x.toString, attr) }
        case ("@scriptcode", _) => __obj.scriptcode foreach { x => attr = scala.xml.Attribute(null, "scriptcode", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Script, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_DimensionsFormat extends scalaxb.ElemNameParser[Dimensions] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("dimensions")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dimensions] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dimensions")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dimensions](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Dimensions(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@unit").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@unit" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Dimensions, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@unit", _) => __obj.unit foreach { x => attr = scala.xml.Attribute(null, "unit", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Dimensions, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_PhysfacetFormat extends scalaxb.ElemNameParser[Physfacet] with Generated_Mu46mixedu46basicu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("physfacet")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Physfacet] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Physfacet(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ },
        (node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ },
        (node \ "@identifier").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@identifier" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Physfacet, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
        case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
        case ("@identifier", _) => __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Physfacet, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_AddressFormat extends scalaxb.ElemNameParser[Address] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("address")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Address] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "addressline")) ^^
      { case p1 =>
      Address(p1 map { scalaxb.fromXML[Addressline](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Address, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Address, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.addressline flatMap { scalaxb.toXML[Addressline](_, Some("http://ead3.archivists.org/schema/"), Some("addressline"), __scope, false) })

  }

  trait DefaultGenerated_AddresslineFormat extends scalaxb.ElemNameParser[Addressline] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("addressline")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Addressline] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Addressline(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Addressline, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Addressline, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ArchrefFormat extends scalaxb.ElemNameParser[Archref] with Generated_Mu46mixedu46basicu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("archref")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Archref] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Archref(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Archref, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Archref, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_BibrefFormat extends scalaxb.ElemNameParser[Bibref] with Generated_Mu46mixedu46basicu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("bibref")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Bibref] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Bibref(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Bibref, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Bibref, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_DescriptivenoteFormat extends scalaxb.ElemNameParser[Descriptivenote] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("descriptivenote")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Descriptivenote] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^
      { case p1 =>
      Descriptivenote(p1 map { scalaxb.fromXML[P](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Descriptivenote, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Descriptivenote, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.p flatMap { scalaxb.toXML[P](_, Some("http://ead3.archivists.org/schema/"), Some("p"), __scope, false) })

  }

  def buildGenerated_ShowFormat = new DefaultGenerated_ShowFormat {}
  trait DefaultGenerated_ShowFormat extends scalaxb.XMLFormat[Show] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Show = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("new")) => NewValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("replace")) => Replace
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("embed")) => Embed
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => Other
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneTypeValue2

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Show] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Show, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_ActuateFormat = new DefaultGenerated_ActuateFormat {}
  trait DefaultGenerated_ActuateFormat extends scalaxb.XMLFormat[Actuate] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Actuate = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("onload")) => Onload
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("onrequest")) => Onrequest
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneTypeValue3

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Actuate] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Actuate, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_FootnoteFormat extends scalaxb.ElemNameParser[Footnote] with Generated_Mu46blocksGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("footnote")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Footnote] =
      phrase(safeRep(parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack)) ^^
      { case p1 =>
      Footnote(p1,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Show](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Actuate](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Footnote, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Footnote, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.mu46blocksOption1 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_HeadFormat extends scalaxb.ElemNameParser[Head] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("head")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Head] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Head(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@althead").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@althead" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Head, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@althead", _) => __obj.althead foreach { x => attr = scala.xml.Attribute(null, "althead", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Head, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_DatesingleFormat extends scalaxb.ElemNameParser[Datesingle] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("datesingle")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Datesingle] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Datesingle(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@standarddate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@standarddate" -> _ },
        (node \ "@notbefore").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notbefore" -> _ },
        (node \ "@notafter").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notafter" -> _ },
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Datesingle, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@standarddate", _) => __obj.standarddate foreach { x => attr = scala.xml.Attribute(null, "standarddate", x.toString, attr) }
        case ("@notbefore", _) => __obj.notbefore foreach { x => attr = scala.xml.Attribute(null, "notbefore", x.toString, attr) }
        case ("@notafter", _) => __obj.notafter foreach { x => attr = scala.xml.Attribute(null, "notafter", x.toString, attr) }
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Datesingle, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_DaterangeFormat extends scalaxb.ElemNameParser[Daterange] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("daterange")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Daterange] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "fromdate")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "todate")) ^^
      { case p1 ~ p2 =>
      Daterange(p1.headOption map { scalaxb.fromXML[Fromdate](_, scalaxb.ElemName(node) :: stack) },
        p2.headOption map { scalaxb.fromXML[Todate](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Daterange, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Daterange, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.fromdate map { scalaxb.toXML[Fromdate](_, Some("http://ead3.archivists.org/schema/"), Some("fromdate"), __scope, false) } getOrElse {Nil},
        __obj.todate map { scalaxb.toXML[Todate](_, Some("http://ead3.archivists.org/schema/"), Some("todate"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_FromdateFormat extends scalaxb.ElemNameParser[Fromdate] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("fromdate")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Fromdate] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Fromdate(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@standarddate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@standarddate" -> _ },
        (node \ "@notbefore").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notbefore" -> _ },
        (node \ "@notafter").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notafter" -> _ },
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Fromdate, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@standarddate", _) => __obj.standarddate foreach { x => attr = scala.xml.Attribute(null, "standarddate", x.toString, attr) }
        case ("@notbefore", _) => __obj.notbefore foreach { x => attr = scala.xml.Attribute(null, "notbefore", x.toString, attr) }
        case ("@notafter", _) => __obj.notafter foreach { x => attr = scala.xml.Attribute(null, "notafter", x.toString, attr) }
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Fromdate, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_TodateFormat extends scalaxb.ElemNameParser[Todate] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("todate")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Todate] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Todate(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@standarddate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@standarddate" -> _ },
        (node \ "@notbefore").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notbefore" -> _ },
        (node \ "@notafter").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notafter" -> _ },
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Todate, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@standarddate", _) => __obj.standarddate foreach { x => attr = scala.xml.Attribute(null, "standarddate", x.toString, attr) }
        case ("@notbefore", _) => __obj.notbefore foreach { x => attr = scala.xml.Attribute(null, "notbefore", x.toString, attr) }
        case ("@notafter", _) => __obj.notafter foreach { x => attr = scala.xml.Attribute(null, "notafter", x.toString, attr) }
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Todate, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_DatesetFormat extends scalaxb.ElemNameParser[Dateset] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("dateset")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dateset] =
      phrase((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "datesingle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Datesingle](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daterange")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daterange](x, scalaxb.ElemName(node) :: stack))))) ~ 
      safeRep(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "datesingle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Datesingle](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daterange")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daterange](x, scalaxb.ElemName(node) :: stack))))) ^^
      { case p1 ~ p2 =>
      Dateset(p1,
        p2,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Dateset, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Dateset, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat((Some(__obj.datesetoption) map {x => scalaxb.toXML[scalaxb.DataRecord[DatesetOption]](x, x.namespace, x.key, __scope, false)}).get,
        __obj.datesetoption2 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[DatesetOption2]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_AbbrFormat extends scalaxb.ElemNameParser[Abbr] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("abbr")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Abbr] =
      phrase(optTextRecord ^^
      { case p1 =>
      Abbr(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@expan").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@expan" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Abbr, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@expan", _) => __obj.expan foreach { x => attr = scala.xml.Attribute(null, "expan", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Abbr, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_DateFormat extends scalaxb.ElemNameParser[Date] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("date")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Date] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Date(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@era").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@era" -> _ },
        (node \ "@calendar").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@calendar" -> _ },
        (node \ "@normal").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@normal" -> _ },
        (node \ "@certainty").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@certainty" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Date, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@era", _) => __obj.era foreach { x => attr = scala.xml.Attribute(null, "era", x.toString, attr) }
        case ("@calendar", _) => __obj.calendar foreach { x => attr = scala.xml.Attribute(null, "calendar", x.toString, attr) }
        case ("@normal", _) => __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
        case ("@certainty", _) => __obj.certainty foreach { x => attr = scala.xml.Attribute(null, "certainty", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Date, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_RenderType2Format = new DefaultGenerated_RenderType2Format {}
  trait DefaultGenerated_RenderType2Format extends scalaxb.XMLFormat[RenderType2] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): RenderType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("altrender")) => AltrenderValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bold")) => BoldValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolddoublequote")) => BolddoublequoteValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolditalic")) => BolditalicValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsinglequote")) => BoldsinglequoteValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsmcaps")) => BoldsmcapsValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldunderline")) => BoldunderlineValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("doublequote")) => DoublequoteValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("italic")) => ItalicValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nonproport")) => NonproportValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("singlequote")) => SinglequoteValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("smcaps")) => SmcapsValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("sub")) => SubValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("super")) => SuperValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("underline")) => UnderlineValue2

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, RenderType2] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: RenderType2, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_EmphFormat extends scalaxb.ElemNameParser[Emph] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("emph")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Emph] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Emph(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@render").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[RenderType2](x, scalaxb.ElemName(node) :: stack)) } map { "@render" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Emph, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@render", _) => __obj.render foreach { x => attr = scala.xml.Attribute(null, "render", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Emph, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ExpanFormat extends scalaxb.ElemNameParser[Expan] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("expan")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Expan] =
      phrase(optTextRecord ^^
      { case p1 =>
      Expan(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@abbr").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@abbr" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Expan, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@abbr", _) => __obj.abbr foreach { x => attr = scala.xml.Attribute(null, "abbr", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Expan, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_RenderType3Format = new DefaultGenerated_RenderType3Format {}
  trait DefaultGenerated_RenderType3Format extends scalaxb.XMLFormat[RenderType3] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): RenderType3 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("altrender")) => AltrenderValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bold")) => BoldValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolddoublequote")) => BolddoublequoteValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolditalic")) => BolditalicValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsinglequote")) => BoldsinglequoteValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsmcaps")) => BoldsmcapsValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldunderline")) => BoldunderlineValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("doublequote")) => DoublequoteValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("italic")) => ItalicValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nonproport")) => NonproportValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("singlequote")) => SinglequoteValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("smcaps")) => SmcapsValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("sub")) => SubValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("super")) => SuperValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("underline")) => UnderlineValue3

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, RenderType3] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: RenderType3, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_ForeignFormat extends scalaxb.ElemNameParser[Foreign] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("foreign")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Foreign] =
      phrase(optTextRecord ^^
      { case p1 =>
      Foreign(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@render").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[RenderType3](x, scalaxb.ElemName(node) :: stack)) } map { "@render" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Foreign, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@render", _) => __obj.render foreach { x => attr = scala.xml.Attribute(null, "render", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Foreign, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_LbFormat extends scalaxb.XMLFormat[Lb] with scalaxb.CanWriteChildNodes[Lb] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    import scalaxb.ElemName._
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Lb] = seq match {
      case node: scala.xml.Node => Right(Lb())
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def writesChildNodes(__obj: Lb, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Nil


  }

  trait DefaultGenerated_NumFormat extends scalaxb.ElemNameParser[Num] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("num")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Num] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Num(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Num, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Num, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_RenderType4Format = new DefaultGenerated_RenderType4Format {}
  trait DefaultGenerated_RenderType4Format extends scalaxb.XMLFormat[RenderType4] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): RenderType4 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("altrender")) => AltrenderValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bold")) => BoldValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolddoublequote")) => BolddoublequoteValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolditalic")) => BolditalicValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsinglequote")) => BoldsinglequoteValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsmcaps")) => BoldsmcapsValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldunderline")) => BoldunderlineValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("doublequote")) => DoublequoteValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("italic")) => ItalicValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nonproport")) => NonproportValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("singlequote")) => SinglequoteValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("smcaps")) => SmcapsValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("sub")) => SubValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("super")) => SuperValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("underline")) => UnderlineValue4

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, RenderType4] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: RenderType4, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_QuoteFormat extends scalaxb.ElemNameParser[Quote] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("quote")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Quote] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Quote(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@render").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[RenderType4](x, scalaxb.ElemName(node) :: stack)) } map { "@render" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Quote, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@render", _) => __obj.render foreach { x => attr = scala.xml.Attribute(null, "render", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Quote, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_PtrFormat extends scalaxb.XMLFormat[Ptr] with scalaxb.CanWriteChildNodes[Ptr] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    import scalaxb.ElemName._
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Ptr] = seq match {
      case node: scala.xml.Node => Right(Ptr(scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@target").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@target" -> _ },
        (node \ "@xpointer").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@xpointer" -> _ },
        (node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ },
        (node \ "@linkrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@linkrole" -> _ },
        (node \ "@arcrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@arcrole" -> _ },
        (node \ "@linktitle").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@linktitle" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ShowType](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ActuateType](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ },
        (node \ "@entityref").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@entityref" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    override def writesAttribute(__obj: Ptr, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@target", _) => __obj.target foreach { x => attr = scala.xml.Attribute(null, "target", x.toString, attr) }
        case ("@xpointer", _) => __obj.xpointer foreach { x => attr = scala.xml.Attribute(null, "xpointer", x.toString, attr) }
        case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
        case ("@linkrole", _) => __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
        case ("@arcrole", _) => __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
        case ("@linktitle", _) => __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case ("@entityref", _) => __obj.entityref foreach { x => attr = scala.xml.Attribute(null, "entityref", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Ptr, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Nil


  }

  trait DefaultGenerated_RefFormat extends scalaxb.ElemNameParser[Ref] with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("ref")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Ref] =
      phrase(optTextRecord ~ 
      safeRep(((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abbr](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "expan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Expan](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "emph")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Emph](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "lb")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lb](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack))) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Ref(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@target").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@target" -> _ },
        (node \ "@xpointer").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@xpointer" -> _ },
        (node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ },
        (node \ "@linkrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@linkrole" -> _ },
        (node \ "@arcrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@arcrole" -> _ },
        (node \ "@linktitle").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@linktitle" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ShowType](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ActuateType](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ },
        (node \ "@entityref").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@entityref" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Ref, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@target", _) => __obj.target foreach { x => attr = scala.xml.Attribute(null, "target", x.toString, attr) }
        case ("@xpointer", _) => __obj.xpointer foreach { x => attr = scala.xml.Attribute(null, "xpointer", x.toString, attr) }
        case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
        case ("@linkrole", _) => __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
        case ("@arcrole", _) => __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
        case ("@linktitle", _) => __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case ("@entityref", _) => __obj.entityref foreach { x => attr = scala.xml.Attribute(null, "entityref", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Ref, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_DsctypeFormat = new DefaultGenerated_DsctypeFormat {}
  trait DefaultGenerated_DsctypeFormat extends scalaxb.XMLFormat[Dsctype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Dsctype = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("analyticover")) => Analyticover
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("combined")) => Combined
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("in-depth")) => Inu45depth
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherdsctype")) => Otherdsctype

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Dsctype] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Dsctype, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_DscFormat extends scalaxb.ElemNameParser[Dsc] with Generated_Mu46blocksGroupFormat with Generated_Mu46cOrC01GroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("dsc")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dsc] =
      phrase(((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      safeRep(parseMu46blocksGroup(node, scalaxb.ElemName(node) :: stack))) ^^ 
        { case p1 ~ p2 => DscSequence1(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        p2) }) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(parseMu46cOrC01Group(node, scalaxb.ElemName(node) :: stack)) ^^
      { case p1 ~ p2 ~ p3 =>
      Dsc(p1,
        p2.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p3,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@dsctype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Dsctype](x, scalaxb.ElemName(node) :: stack)) } map { "@dsctype" -> _ },
        (node \ "@otherdsctype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherdsctype" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Dsc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@dsctype", _) => __obj.dsctype foreach { x => attr = scala.xml.Attribute(null, "dsctype", x.toString, attr) }
        case ("@otherdsctype", _) => __obj.otherdsctype foreach { x => attr = scala.xml.Attribute(null, "otherdsctype", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Dsc, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(scalaxb.toXML[DscSequence1](__obj.dscsequence1, None, Some("dscsequence1"), __scope, false),
        __obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.mu46cOrC01Option3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46cOrC01Option]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_DscSequence1Format extends scalaxb.XMLFormat[DscSequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DscSequence1] = Left("don't call me.")
    
    def writes(__obj: DscSequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        __obj.mu46blocksOption2 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) })


  }

  trait DefaultGenerated_CFormat extends scalaxb.ElemNameParser[C] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c"))) ^^ 
        { case p1 ~ p2 => CSequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.csequence1 flatMap { scalaxb.toXML[CSequence1](_, None, Some("csequence1"), __scope, false) })

  }

  trait DefaultGenerated_CSequence1Format extends scalaxb.XMLFormat[CSequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, CSequence1] = Left("don't call me.")
    
    def writes(__obj: CSequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c flatMap { scalaxb.toXML[C](_, Some("http://ead3.archivists.org/schema/"), Some("c"), __scope, false) })


  }

  trait DefaultGenerated_C01Format extends scalaxb.ElemNameParser[C01] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c01")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C01] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c02"))) ^^ 
        { case p1 ~ p2 => C01Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C02](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C01(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C01, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C01, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c01sequence1 flatMap { scalaxb.toXML[C01Sequence1](_, None, Some("c01sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C01Sequence1Format extends scalaxb.XMLFormat[C01Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C01Sequence1] = Left("don't call me.")
    
    def writes(__obj: C01Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c02 flatMap { scalaxb.toXML[C02](_, Some("http://ead3.archivists.org/schema/"), Some("c02"), __scope, false) })


  }

  trait DefaultGenerated_C02Format extends scalaxb.ElemNameParser[C02] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c02")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C02] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c03"))) ^^ 
        { case p1 ~ p2 => C02Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C03](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C02(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C02, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C02, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c02sequence1 flatMap { scalaxb.toXML[C02Sequence1](_, None, Some("c02sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C02Sequence1Format extends scalaxb.XMLFormat[C02Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C02Sequence1] = Left("don't call me.")
    
    def writes(__obj: C02Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c03 flatMap { scalaxb.toXML[C03](_, Some("http://ead3.archivists.org/schema/"), Some("c03"), __scope, false) })


  }

  trait DefaultGenerated_C03Format extends scalaxb.ElemNameParser[C03] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c03")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C03] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c04"))) ^^ 
        { case p1 ~ p2 => C03Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C04](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C03(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C03, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C03, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c03sequence1 flatMap { scalaxb.toXML[C03Sequence1](_, None, Some("c03sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C03Sequence1Format extends scalaxb.XMLFormat[C03Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C03Sequence1] = Left("don't call me.")
    
    def writes(__obj: C03Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c04 flatMap { scalaxb.toXML[C04](_, Some("http://ead3.archivists.org/schema/"), Some("c04"), __scope, false) })


  }

  trait DefaultGenerated_C04Format extends scalaxb.ElemNameParser[C04] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c04")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C04] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c05"))) ^^ 
        { case p1 ~ p2 => C04Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C05](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C04(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C04, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C04, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c04sequence1 flatMap { scalaxb.toXML[C04Sequence1](_, None, Some("c04sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C04Sequence1Format extends scalaxb.XMLFormat[C04Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C04Sequence1] = Left("don't call me.")
    
    def writes(__obj: C04Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c05 flatMap { scalaxb.toXML[C05](_, Some("http://ead3.archivists.org/schema/"), Some("c05"), __scope, false) })


  }

  trait DefaultGenerated_C05Format extends scalaxb.ElemNameParser[C05] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c05")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C05] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c06"))) ^^ 
        { case p1 ~ p2 => C05Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C06](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C05(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C05, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C05, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c05sequence1 flatMap { scalaxb.toXML[C05Sequence1](_, None, Some("c05sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C05Sequence1Format extends scalaxb.XMLFormat[C05Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C05Sequence1] = Left("don't call me.")
    
    def writes(__obj: C05Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c06 flatMap { scalaxb.toXML[C06](_, Some("http://ead3.archivists.org/schema/"), Some("c06"), __scope, false) })


  }

  trait DefaultGenerated_C06Format extends scalaxb.ElemNameParser[C06] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c06")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C06] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c07"))) ^^ 
        { case p1 ~ p2 => C06Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C07](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C06(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C06, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C06, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c06sequence1 flatMap { scalaxb.toXML[C06Sequence1](_, None, Some("c06sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C06Sequence1Format extends scalaxb.XMLFormat[C06Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C06Sequence1] = Left("don't call me.")
    
    def writes(__obj: C06Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c07 flatMap { scalaxb.toXML[C07](_, Some("http://ead3.archivists.org/schema/"), Some("c07"), __scope, false) })


  }

  trait DefaultGenerated_C07Format extends scalaxb.ElemNameParser[C07] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c07")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C07] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c08"))) ^^ 
        { case p1 ~ p2 => C07Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C08](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C07(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C07, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C07, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c07sequence1 flatMap { scalaxb.toXML[C07Sequence1](_, None, Some("c07sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C07Sequence1Format extends scalaxb.XMLFormat[C07Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C07Sequence1] = Left("don't call me.")
    
    def writes(__obj: C07Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c08 flatMap { scalaxb.toXML[C08](_, Some("http://ead3.archivists.org/schema/"), Some("c08"), __scope, false) })


  }

  trait DefaultGenerated_C08Format extends scalaxb.ElemNameParser[C08] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c08")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C08] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c09"))) ^^ 
        { case p1 ~ p2 => C08Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C09](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C08(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C08, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C08, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c08sequence1 flatMap { scalaxb.toXML[C08Sequence1](_, None, Some("c08sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C08Sequence1Format extends scalaxb.XMLFormat[C08Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C08Sequence1] = Left("don't call me.")
    
    def writes(__obj: C08Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c09 flatMap { scalaxb.toXML[C09](_, Some("http://ead3.archivists.org/schema/"), Some("c09"), __scope, false) })


  }

  trait DefaultGenerated_C09Format extends scalaxb.ElemNameParser[C09] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c09")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C09] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c10"))) ^^ 
        { case p1 ~ p2 => C09Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C10](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C09(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C09, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C09, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c09sequence1 flatMap { scalaxb.toXML[C09Sequence1](_, None, Some("c09sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C09Sequence1Format extends scalaxb.XMLFormat[C09Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C09Sequence1] = Left("don't call me.")
    
    def writes(__obj: C09Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c10 flatMap { scalaxb.toXML[C10](_, Some("http://ead3.archivists.org/schema/"), Some("c10"), __scope, false) })


  }

  trait DefaultGenerated_C10Format extends scalaxb.ElemNameParser[C10] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c10")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C10] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c11"))) ^^ 
        { case p1 ~ p2 => C10Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C11](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C10(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C10, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C10, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c10sequence1 flatMap { scalaxb.toXML[C10Sequence1](_, None, Some("c10sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C10Sequence1Format extends scalaxb.XMLFormat[C10Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C10Sequence1] = Left("don't call me.")
    
    def writes(__obj: C10Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c11 flatMap { scalaxb.toXML[C11](_, Some("http://ead3.archivists.org/schema/"), Some("c11"), __scope, false) })


  }

  trait DefaultGenerated_C11Format extends scalaxb.ElemNameParser[C11] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("c11")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[C11] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      safeRep((opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "thead")) ~ 
      safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c12"))) ^^ 
        { case p1 ~ p2 => C11Sequence1(p1.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) },
        p2 map { scalaxb.fromXML[C12](_, scalaxb.ElemName(node) :: stack) }) }) ^^
      { case p1 ~ p2 ~ p3 ~ p4 =>
      C11(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        p4,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: C11, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: C11, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) },
        __obj.c11sequence1 flatMap { scalaxb.toXML[C11Sequence1](_, None, Some("c11sequence1"), __scope, false) })

  }

  trait DefaultGenerated_C11Sequence1Format extends scalaxb.XMLFormat[C11Sequence1] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C11Sequence1] = Left("don't call me.")
    
    def writes(__obj: C11Sequence1, __namespace: Option[String], __elementLabel: Option[String], 
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      Seq.concat(__obj.thead map { scalaxb.toXML[Thead](_, Some("http://ead3.archivists.org/schema/"), Some("thead"), __scope, false) } getOrElse {Nil},
        __obj.c12 flatMap { scalaxb.toXML[C12](_, Some("http://ead3.archivists.org/schema/"), Some("c12"), __scope, false) })


  }

  trait DefaultGenerated_C12Format extends scalaxb.XMLFormat[C12] with scalaxb.CanWriteChildNodes[C12] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    import scalaxb.ElemName._
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, C12] = seq match {
      case node: scala.xml.Node => Right(C12())
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def writesChildNodes(__obj: C12, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Nil


  }

  trait DefaultGenerated_RelationsFormat extends scalaxb.ElemNameParser[Relations] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("relations")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Relations] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relation")) ^^
      { case p1 =>
      Relations(p1 map { scalaxb.fromXML[Relation](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Relations, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Relations, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      (__obj.relation flatMap { scalaxb.toXML[Relation](_, Some("http://ead3.archivists.org/schema/"), Some("relation"), __scope, false) })

  }

  def buildGenerated_RelationtypeFormat = new DefaultGenerated_RelationtypeFormat {}
  trait DefaultGenerated_RelationtypeFormat extends scalaxb.XMLFormat[Relationtype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Relationtype = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("cpfrelation")) => Cpfrelation
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("resourcerelation")) => Resourcerelation
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("functionrelation")) => Functionrelation
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherrelationtype")) => Otherrelationtype

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Relationtype] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Relationtype, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  trait DefaultGenerated_RelationFormat extends scalaxb.ElemNameParser[Relation] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("relation")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Relation] =
      phrase(safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relationentry")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "objectxmlwrap")) ~ 
      opt(((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "datesingle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Datesingle](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daterange")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daterange](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dateset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dateset](x, scalaxb.ElemName(node) :: stack))))) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "geogname")) ~ 
      opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "descriptivenote")) ^^
      { case p1 ~ p2 ~ p3 ~ p4 ~ p5 =>
      Relation(p1 map { scalaxb.fromXML[Relationentry](_, scalaxb.ElemName(node) :: stack) },
        p2.headOption map { scalaxb.fromXML[Objectxmlwrap](_, scalaxb.ElemName(node) :: stack) },
        p3,
        p4.headOption map { scalaxb.fromXML[Geogname](_, scalaxb.ElemName(node) :: stack) },
        p5.headOption map { scalaxb.fromXML[Descriptivenote](_, scalaxb.ElemName(node) :: stack) },
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@relationtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Relationtype](x, scalaxb.ElemName(node) :: stack)) } map { "@relationtype" -> _ },
        (node \ "@otherrelationtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherrelationtype" -> _ },
        (node \ "@lastdatetimeverified").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lastdatetimeverified" -> _ },
        (node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ },
        (node \ "@linkrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@linkrole" -> _ },
        (node \ "@arcrole").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@arcrole" -> _ },
        (node \ "@linktitle").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@linktitle" -> _ },
        (node \ "@show").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ShowType](x, scalaxb.ElemName(node) :: stack)) } map { "@show" -> _ },
        (node \ "@actuate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[ActuateType](x, scalaxb.ElemName(node) :: stack)) } map { "@actuate" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Relation, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@relationtype", _) => attr = scala.xml.Attribute(null, "relationtype", __obj.relationtype.toString, attr)
        case ("@otherrelationtype", _) => __obj.otherrelationtype foreach { x => attr = scala.xml.Attribute(null, "otherrelationtype", x.toString, attr) }
        case ("@lastdatetimeverified", _) => __obj.lastdatetimeverified foreach { x => attr = scala.xml.Attribute(null, "lastdatetimeverified", x.toString, attr) }
        case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
        case ("@linkrole", _) => __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
        case ("@arcrole", _) => __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
        case ("@linktitle", _) => __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
        case ("@show", _) => __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
        case ("@actuate", _) => __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Relation, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.relationentry flatMap { scalaxb.toXML[Relationentry](_, Some("http://ead3.archivists.org/schema/"), Some("relationentry"), __scope, false) },
        __obj.objectxmlwrap map { scalaxb.toXML[Objectxmlwrap](_, Some("http://ead3.archivists.org/schema/"), Some("objectxmlwrap"), __scope, false) } getOrElse {Nil},
        __obj.relationoption map { x => scalaxb.toXML[scalaxb.DataRecord[RelationOption]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil},
        __obj.geogname map { scalaxb.toXML[Geogname](_, Some("http://ead3.archivists.org/schema/"), Some("geogname"), __scope, false) } getOrElse {Nil},
        __obj.descriptivenote map { scalaxb.toXML[Descriptivenote](_, Some("http://ead3.archivists.org/schema/"), Some("descriptivenote"), __scope, false) } getOrElse {Nil})

  }

  trait DefaultGenerated_RelationentryFormat extends scalaxb.ElemNameParser[Relationentry] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("relationentry")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Relationentry] =
      phrase(optTextRecord ^^
      { case p1 =>
      Relationentry(Seq.concat(p1.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ },
        (node \ "@localtype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@localtype" -> _ },
        (node \ "@transliteration").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@transliteration" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Relationentry, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case ("@localtype", _) => __obj.localtype foreach { x => attr = scala.xml.Attribute(null, "localtype", x.toString, attr) }
        case ("@transliteration", _) => __obj.transliteration foreach { x => attr = scala.xml.Attribute(null, "transliteration", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Relationentry, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_ObjectxmlwrapFormat extends scalaxb.ElemNameParser[Objectxmlwrap] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("objectxmlwrap")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Objectxmlwrap] =
      phrase((any(_ => true)) ^^
      { case p1 =>
      Objectxmlwrap(scalaxb.fromXML[scalaxb.DataRecord[Any]](p1, scalaxb.ElemName(node) :: stack),
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Objectxmlwrap, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Objectxmlwrap, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      ((Some(__obj.any) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true)}).get)

  }

  trait DefaultGenerated_Eu46anynamableFormat extends scalaxb.XMLFormat[Eu46anynamable] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Eu46anynamable] = seq match {
      case node: scala.xml.Node =>     
        scalaxb.Helper.instanceType(node) match {
          case (Some("http://ead3.archivists.org/schema/"), Some("objectxmlwrap")) => Right(scalaxb.fromXML[Objectxmlwrap](node, stack))
          case _ => Right(scalaxb.fromXML[Eu46anyname](node, stack))
        }
      case _ => Left("reads failed: seq must be scala.xml.Node")  
    }
    
    def writes(__obj: Eu46anynamable, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match {
      case x: Objectxmlwrap => scalaxb.toXML[Objectxmlwrap](x, __namespace, __elementLabel, __scope, true)
      case x: Eu46anyname => scalaxb.toXML[Eu46anyname](x, __namespace, __elementLabel, __scope, false)
    }
  }

  trait DefaultGenerated_Eu46anynameFormat extends scalaxb.ElemNameParser[Eu46anyname] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("e.anyname")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Eu46anyname] =
      phrase((any(_ => true)) ^^
      { case p1 =>
      Eu46anyname(scalaxb.fromXML[scalaxb.DataRecord[Any]](p1, scalaxb.ElemName(node) :: stack)) })
    
    def writesChildNodes(__obj: Eu46anyname, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      ((Some(__obj.any) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true)}).get)

  }

  trait DefaultGenerated_Mu46cu46basableFormat extends scalaxb.XMLFormat[Mu46cu46basable] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Mu46cu46basable] = seq match {
      case node: scala.xml.Node =>     
        scalaxb.Helper.instanceType(node) match {
          case (Some("http://ead3.archivists.org/schema/"), Some("c11")) => Right(scalaxb.fromXML[C11](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c09")) => Right(scalaxb.fromXML[C09](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c07")) => Right(scalaxb.fromXML[C07](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c05")) => Right(scalaxb.fromXML[C05](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c03")) => Right(scalaxb.fromXML[C03](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c01")) => Right(scalaxb.fromXML[C01](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c")) => Right(scalaxb.fromXML[C](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c02")) => Right(scalaxb.fromXML[C02](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c04")) => Right(scalaxb.fromXML[C04](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c06")) => Right(scalaxb.fromXML[C06](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c08")) => Right(scalaxb.fromXML[C08](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("c10")) => Right(scalaxb.fromXML[C10](node, stack))
          case _ => Right(scalaxb.fromXML[Mu46cu46base](node, stack))
        }
      case _ => Left("reads failed: seq must be scala.xml.Node")  
    }
    
    def writes(__obj: Mu46cu46basable, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match {
      case x: C11 => scalaxb.toXML[C11](x, __namespace, __elementLabel, __scope, true)
      case x: C09 => scalaxb.toXML[C09](x, __namespace, __elementLabel, __scope, true)
      case x: C07 => scalaxb.toXML[C07](x, __namespace, __elementLabel, __scope, true)
      case x: C05 => scalaxb.toXML[C05](x, __namespace, __elementLabel, __scope, true)
      case x: C03 => scalaxb.toXML[C03](x, __namespace, __elementLabel, __scope, true)
      case x: C01 => scalaxb.toXML[C01](x, __namespace, __elementLabel, __scope, true)
      case x: C => scalaxb.toXML[C](x, __namespace, __elementLabel, __scope, true)
      case x: C02 => scalaxb.toXML[C02](x, __namespace, __elementLabel, __scope, true)
      case x: C04 => scalaxb.toXML[C04](x, __namespace, __elementLabel, __scope, true)
      case x: C06 => scalaxb.toXML[C06](x, __namespace, __elementLabel, __scope, true)
      case x: C08 => scalaxb.toXML[C08](x, __namespace, __elementLabel, __scope, true)
      case x: C10 => scalaxb.toXML[C10](x, __namespace, __elementLabel, __scope, true)
      case x: Mu46cu46base => scalaxb.toXML[Mu46cu46base](x, __namespace, __elementLabel, __scope, false)
    }
  }

  trait DefaultGenerated_Mu46cu46baseFormat extends scalaxb.ElemNameParser[Mu46cu46base] with Generated_Mu46descu46baseGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("m.c.base")

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Mu46cu46base] =
      phrase(opt(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "head")) ~ 
      (scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "did")) ~ 
      safeRep(parseMu46descu46baseGroup(node, scalaxb.ElemName(node) :: stack)) ^^
      { case p1 ~ p2 ~ p3 =>
      Mu46cu46base(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) },
        scalaxb.fromXML[Did](p2, scalaxb.ElemName(node) :: stack),
        p3,
        scala.collection.immutable.ListMap(List(
        (node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ },
        (node \ "@altrender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@altrender" -> _ },
        (node \ "@audience").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Audience](x, scalaxb.ElemName(node) :: stack)) } map { "@audience" -> _ },
        (node \ "@lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lang" -> _ },
        (node \ "@script").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@script" -> _ },
        (node \ "@base").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[java.net.URI](x, scalaxb.ElemName(node) :: stack)) } map { "@base" -> _ },
        (node \ "@level").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Level](x, scalaxb.ElemName(node) :: stack)) } map { "@level" -> _ },
        (node \ "@otherlevel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@otherlevel" -> _ },
        (node \ "@encodinganalog").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encodinganalog" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Mu46cu46base, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
        case ("@altrender", _) => __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
        case ("@audience", _) => __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
        case ("@lang", _) => __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
        case ("@script", _) => __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
        case ("@base", _) => __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
        case ("@level", _) => __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
        case ("@otherlevel", _) => __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
        case ("@encodinganalog", _) => __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Mu46cu46base, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://ead3.archivists.org/schema/"), Some("head"), __scope, false) } getOrElse {Nil},
        scalaxb.toXML[Did](__obj.did, Some("http://ead3.archivists.org/schema/"), Some("did"), __scope, false),
        __obj.mu46descu46baseOption3 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Mu46descu46baseOption]](x, x.namespace, x.key, __scope, false) })

  }

  trait DefaultGenerated_Mu46datesinglableFormat extends scalaxb.XMLFormat[Mu46datesinglable] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Mu46datesinglable] = seq match {
      case node: scala.xml.Node =>     
        scalaxb.Helper.instanceType(node) match {
          case (Some("http://ead3.archivists.org/schema/"), Some("todate")) => Right(scalaxb.fromXML[Todate](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("datesingle")) => Right(scalaxb.fromXML[Datesingle](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("fromdate")) => Right(scalaxb.fromXML[Fromdate](node, stack))
          case _ => Right(scalaxb.fromXML[Mu46datesingle](node, stack))
        }
      case _ => Left("reads failed: seq must be scala.xml.Node")  
    }
    
    def writes(__obj: Mu46datesinglable, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match {
      case x: Todate => scalaxb.toXML[Todate](x, __namespace, __elementLabel, __scope, true)
      case x: Datesingle => scalaxb.toXML[Datesingle](x, __namespace, __elementLabel, __scope, true)
      case x: Fromdate => scalaxb.toXML[Fromdate](x, __namespace, __elementLabel, __scope, true)
      case x: Mu46datesingle => scalaxb.toXML[Mu46datesingle](x, __namespace, __elementLabel, __scope, false)
    }
  }

  trait DefaultGenerated_Mu46datesingleFormat extends scalaxb.ElemNameParser[Mu46datesingle] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("m.datesingle")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Mu46datesingle] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Mu46datesingle(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList),
        scala.collection.immutable.ListMap(List(
        (node \ "@standarddate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@standarddate" -> _ },
        (node \ "@notbefore").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notbefore" -> _ },
        (node \ "@notafter").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@notafter" -> _ }
        ).flatten[(String, scalaxb.DataRecord[Any])]: _*)) })
    
    override def writesAttribute(__obj: Mu46datesingle, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      __obj.attributes.toList map {
        case ("@standarddate", _) => __obj.standarddate foreach { x => attr = scala.xml.Attribute(null, "standarddate", x.toString, attr) }
        case ("@notbefore", _) => __obj.notbefore foreach { x => attr = scala.xml.Attribute(null, "notbefore", x.toString, attr) }
        case ("@notafter", _) => __obj.notafter foreach { x => attr = scala.xml.Attribute(null, "notafter", x.toString, attr) }
        case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr)
      }
      attr
    }

    def writesChildNodes(__obj: Mu46datesingle, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_Mu46mixedu46basicableFormat extends scalaxb.XMLFormat[Mu46mixedu46basicable] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Mu46mixedu46basicable] = seq match {
      case node: scala.xml.Node =>     
        scalaxb.Helper.instanceType(node) match {
          case (Some("http://ead3.archivists.org/schema/"), Some("m.datesingle")) => Right(scalaxb.fromXML[Mu46datesinglable](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("todate")) => Right(scalaxb.fromXML[Todate](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("datesingle")) => Right(scalaxb.fromXML[Datesingle](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("fromdate")) => Right(scalaxb.fromXML[Fromdate](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("num")) => Right(scalaxb.fromXML[Num](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("emph")) => Right(scalaxb.fromXML[Emph](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("head")) => Right(scalaxb.fromXML[Head](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("head02")) => Right(scalaxb.fromXML[Head02](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("label")) => Right(scalaxb.fromXML[Label](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("unitdate")) => Right(scalaxb.fromXML[Unitdate](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("physloc")) => Right(scalaxb.fromXML[Physloc](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("container")) => Right(scalaxb.fromXML[Container](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("citation")) => Right(scalaxb.fromXML[Citation](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("publisher")) => Right(scalaxb.fromXML[Publisher](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("sponsor")) => Right(scalaxb.fromXML[Sponsor](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("subtitle")) => Right(scalaxb.fromXML[Subtitle](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("titleproper")) => Right(scalaxb.fromXML[Titleproper](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("author")) => Right(scalaxb.fromXML[Author](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("edition")) => Right(scalaxb.fromXML[Edition](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("didnote")) => Right(scalaxb.fromXML[Didnote](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("materialspec")) => Right(scalaxb.fromXML[Materialspec](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("physdesc")) => Right(scalaxb.fromXML[Physdesc](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("unitid")) => Right(scalaxb.fromXML[Unitid](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("head01")) => Right(scalaxb.fromXML[Head01](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("head03")) => Right(scalaxb.fromXML[Head03](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("addressline")) => Right(scalaxb.fromXML[Addressline](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("date")) => Right(scalaxb.fromXML[Date](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("quote")) => Right(scalaxb.fromXML[Quote](node, stack))
          case _ => Right(scalaxb.fromXML[Mu46mixedu46basic](node, stack))
        }
      case _ => Left("reads failed: seq must be scala.xml.Node")  
    }
    
    def writes(__obj: Mu46mixedu46basicable, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match {
      case x: Mu46datesinglable => scalaxb.toXML[Mu46datesinglable](x, __namespace, __elementLabel, __scope, true)
      case x: Num => scalaxb.toXML[Num](x, __namespace, __elementLabel, __scope, true)
      case x: Emph => scalaxb.toXML[Emph](x, __namespace, __elementLabel, __scope, true)
      case x: Head => scalaxb.toXML[Head](x, __namespace, __elementLabel, __scope, true)
      case x: Head02 => scalaxb.toXML[Head02](x, __namespace, __elementLabel, __scope, true)
      case x: Label => scalaxb.toXML[Label](x, __namespace, __elementLabel, __scope, true)
      case x: Unitdate => scalaxb.toXML[Unitdate](x, __namespace, __elementLabel, __scope, true)
      case x: Physloc => scalaxb.toXML[Physloc](x, __namespace, __elementLabel, __scope, true)
      case x: Container => scalaxb.toXML[Container](x, __namespace, __elementLabel, __scope, true)
      case x: Citation => scalaxb.toXML[Citation](x, __namespace, __elementLabel, __scope, true)
      case x: Publisher => scalaxb.toXML[Publisher](x, __namespace, __elementLabel, __scope, true)
      case x: Sponsor => scalaxb.toXML[Sponsor](x, __namespace, __elementLabel, __scope, true)
      case x: Subtitle => scalaxb.toXML[Subtitle](x, __namespace, __elementLabel, __scope, true)
      case x: Titleproper => scalaxb.toXML[Titleproper](x, __namespace, __elementLabel, __scope, true)
      case x: Author => scalaxb.toXML[Author](x, __namespace, __elementLabel, __scope, true)
      case x: Edition => scalaxb.toXML[Edition](x, __namespace, __elementLabel, __scope, true)
      case x: Didnote => scalaxb.toXML[Didnote](x, __namespace, __elementLabel, __scope, true)
      case x: Materialspec => scalaxb.toXML[Materialspec](x, __namespace, __elementLabel, __scope, true)
      case x: Physdesc => scalaxb.toXML[Physdesc](x, __namespace, __elementLabel, __scope, true)
      case x: Unitid => scalaxb.toXML[Unitid](x, __namespace, __elementLabel, __scope, true)
      case x: Head01 => scalaxb.toXML[Head01](x, __namespace, __elementLabel, __scope, true)
      case x: Head03 => scalaxb.toXML[Head03](x, __namespace, __elementLabel, __scope, true)
      case x: Addressline => scalaxb.toXML[Addressline](x, __namespace, __elementLabel, __scope, true)
      case x: Date => scalaxb.toXML[Date](x, __namespace, __elementLabel, __scope, true)
      case x: Quote => scalaxb.toXML[Quote](x, __namespace, __elementLabel, __scope, true)
      case x: Mu46mixedu46basic => scalaxb.toXML[Mu46mixedu46basic](x, __namespace, __elementLabel, __scope, false)
    }
  }

  trait DefaultGenerated_Mu46mixedu46basicFormat extends scalaxb.ElemNameParser[Mu46mixedu46basic] with Generated_Mu46mixedu46basicu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("m.mixed.basic")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Mu46mixedu46basic] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Mu46mixedu46basic(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList)) })
    
    def writesChildNodes(__obj: Mu46mixedu46basic, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_Mu46mixedu46basicu46datableFormat extends scalaxb.XMLFormat[Mu46mixedu46basicu46datable] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Mu46mixedu46basicu46datable] = seq match {
      case node: scala.xml.Node =>     
        scalaxb.Helper.instanceType(node) match {
          case (Some("http://ead3.archivists.org/schema/"), Some("part")) => Right(scalaxb.fromXML[Part](node, stack))
          case _ => Right(scalaxb.fromXML[Mu46mixedu46basicu46date](node, stack))
        }
      case _ => Left("reads failed: seq must be scala.xml.Node")  
    }
    
    def writes(__obj: Mu46mixedu46basicu46datable, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match {
      case x: Part => scalaxb.toXML[Part](x, __namespace, __elementLabel, __scope, true)
      case x: Mu46mixedu46basicu46date => scalaxb.toXML[Mu46mixedu46basicu46date](x, __namespace, __elementLabel, __scope, false)
    }
  }

  trait DefaultGenerated_Mu46mixedu46basicu46dateFormat extends scalaxb.ElemNameParser[Mu46mixedu46basicu46date] with Generated_Mu46mixedu46basicu46dateu46elementsGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("m.mixed.basic.date")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Mu46mixedu46basicu46date] =
      phrase(optTextRecord ~ 
      safeRep(parsemixedMu46mixedu46basicu46dateu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Mu46mixedu46basicu46date(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList)) })
    
    def writesChildNodes(__obj: Mu46mixedu46basicu46date, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_Mu46mixedu46basicu46plusu46accessableFormat extends scalaxb.XMLFormat[Mu46mixedu46basicu46plusu46accessable] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Mu46mixedu46basicu46plusu46accessable] = seq match {
      case node: scala.xml.Node =>     
        scalaxb.Helper.instanceType(node) match {
          case (Some("http://ead3.archivists.org/schema/"), Some("archref")) => Right(scalaxb.fromXML[Archref](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("unittitle")) => Right(scalaxb.fromXML[Unittitle](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("abstract")) => Right(scalaxb.fromXML[Abstract](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("physfacet")) => Right(scalaxb.fromXML[Physfacet](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("bibref")) => Right(scalaxb.fromXML[Bibref](node, stack))
          case _ => Right(scalaxb.fromXML[Mu46mixedu46basicu46plusu46access](node, stack))
        }
      case _ => Left("reads failed: seq must be scala.xml.Node")  
    }
    
    def writes(__obj: Mu46mixedu46basicu46plusu46accessable, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match {
      case x: Archref => scalaxb.toXML[Archref](x, __namespace, __elementLabel, __scope, true)
      case x: Unittitle => scalaxb.toXML[Unittitle](x, __namespace, __elementLabel, __scope, true)
      case x: Abstract => scalaxb.toXML[Abstract](x, __namespace, __elementLabel, __scope, true)
      case x: Physfacet => scalaxb.toXML[Physfacet](x, __namespace, __elementLabel, __scope, true)
      case x: Bibref => scalaxb.toXML[Bibref](x, __namespace, __elementLabel, __scope, true)
      case x: Mu46mixedu46basicu46plusu46access => scalaxb.toXML[Mu46mixedu46basicu46plusu46access](x, __namespace, __elementLabel, __scope, false)
    }
  }

  trait DefaultGenerated_Mu46mixedu46basicu46plusu46accessFormat extends scalaxb.ElemNameParser[Mu46mixedu46basicu46plusu46access] with Generated_Mu46mixedu46basicu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("m.mixed.basic.plus.access")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Mu46mixedu46basicu46plusu46access] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Mu46mixedu46basicu46plusu46access(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList)) })
    
    def writesChildNodes(__obj: Mu46mixedu46basicu46plusu46access, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  trait DefaultGenerated_Mu46parau46contentableFormat extends scalaxb.XMLFormat[Mu46parau46contentable] {
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Mu46parau46contentable] = seq match {
      case node: scala.xml.Node =>     
        scalaxb.Helper.instanceType(node) match {
          case (Some("http://ead3.archivists.org/schema/"), Some("p")) => Right(scalaxb.fromXML[P](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("event")) => Right(scalaxb.fromXML[Event](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("item")) => Right(scalaxb.fromXML[Item](node, stack))
          case (Some("http://ead3.archivists.org/schema/"), Some("entry")) => Right(scalaxb.fromXML[Entry](node, stack))
          case _ => Right(scalaxb.fromXML[Mu46parau46content](node, stack))
        }
      case _ => Left("reads failed: seq must be scala.xml.Node")  
    }
    
    def writes(__obj: Mu46parau46contentable, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match {
      case x: P => scalaxb.toXML[P](x, __namespace, __elementLabel, __scope, true)
      case x: Event => scalaxb.toXML[Event](x, __namespace, __elementLabel, __scope, true)
      case x: Item => scalaxb.toXML[Item](x, __namespace, __elementLabel, __scope, true)
      case x: Entry => scalaxb.toXML[Entry](x, __namespace, __elementLabel, __scope, true)
      case x: Mu46parau46content => scalaxb.toXML[Mu46parau46content](x, __namespace, __elementLabel, __scope, false)
    }
  }

  trait DefaultGenerated_Mu46parau46contentFormat extends scalaxb.ElemNameParser[Mu46parau46content] with Generated_Mu46mixedu46basicu46plusu46elementsGroupFormat with Generated_Mu46accessGroupFormat {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    override def typeName: Option[String] = Some("m.para.content")

    override def isMixed: Boolean = true

    def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Mu46parau46content] =
      phrase(optTextRecord ~ 
      safeRep((parsemixedMu46mixedu46basicu46plusu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      (parsemixedMu46accessGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) })) ~ 
      optTextRecord ^^
      { case p1 ~ p2 ~ p3 =>
      Mu46parau46content(Seq.concat(p1.toList,
        p2.flatten,
        p3.toList)) })
    
    def writesChildNodes(__obj: Mu46parau46content, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

  def buildGenerated_ShowTypeFormat = new DefaultGenerated_ShowTypeFormat {}
  trait DefaultGenerated_ShowTypeFormat extends scalaxb.XMLFormat[ShowType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ShowType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("new")) => NewValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("replace")) => ReplaceValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("embed")) => EmbedValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneTypeValue4

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ShowType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ShowType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_ActuateTypeFormat = new DefaultGenerated_ActuateTypeFormat {}
  trait DefaultGenerated_ActuateTypeFormat extends scalaxb.XMLFormat[ActuateType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ActuateType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("onload")) => OnloadValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("onrequest")) => OnrequestValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneTypeValue5

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ActuateType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ActuateType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_AudienceFormat = new DefaultGenerated_AudienceFormat {}
  trait DefaultGenerated_AudienceFormat extends scalaxb.XMLFormat[Audience] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Audience = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("external")) => External
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("internal")) => Internal

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Audience] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Audience, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_LevelFormat = new DefaultGenerated_LevelFormat {}
  trait DefaultGenerated_LevelFormat extends scalaxb.XMLFormat[Level] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Level = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("class")) => Class
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("collection")) => Collection
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("file")) => File
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("fonds")) => Fonds
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("item")) => ItemValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherlevel")) => Otherlevel
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("recordgrp")) => Recordgrp
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("series")) => Series
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("subfonds")) => Subfonds
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("subgrp")) => Subgrp
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("subseries")) => Subseries

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Level] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Level, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_ActuateType2Format = new DefaultGenerated_ActuateType2Format {}
  trait DefaultGenerated_ActuateType2Format extends scalaxb.XMLFormat[ActuateType2] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ActuateType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("onload")) => OnloadValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("onrequest")) => OnrequestValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneTypeValue6

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ActuateType2] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ActuateType2, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_ShowType2Format = new DefaultGenerated_ShowType2Format {}
  trait DefaultGenerated_ShowType2Format extends scalaxb.XMLFormat[ShowType2] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ShowType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("new")) => NewValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("replace")) => ReplaceValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("embed")) => EmbedValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneTypeValue7

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ShowType2] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ShowType2, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_AlignType3Format = new DefaultGenerated_AlignType3Format {}
  trait DefaultGenerated_AlignType3Format extends scalaxb.XMLFormat[AlignType3] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): AlignType3 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("left")) => LeftTypeValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("right")) => RightTypeValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("center")) => CenterValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("justify")) => JustifyValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("char")) => CharTypeValue3

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, AlignType3] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: AlignType3, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_ValignType4Format = new DefaultGenerated_ValignType4Format {}
  trait DefaultGenerated_ValignType4Format extends scalaxb.XMLFormat[ValignType4] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): ValignType4 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => TopValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("middle")) => MiddleValue4
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => BottomValue5

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, ValignType4] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: ValignType4, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_RenderType5Format = new DefaultGenerated_RenderType5Format {}
  trait DefaultGenerated_RenderType5Format extends scalaxb.XMLFormat[RenderType5] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): RenderType5 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("altrender")) => AltrenderValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bold")) => BoldValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolddoublequote")) => BolddoublequoteValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bolditalic")) => BolditalicValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsinglequote")) => BoldsinglequoteValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldsmcaps")) => BoldsmcapsValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("boldunderline")) => BoldunderlineValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("doublequote")) => DoublequoteValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("italic")) => ItalicValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nonproport")) => NonproportValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("singlequote")) => SinglequoteValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("smcaps")) => SmcapsValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("sub")) => SubValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("super")) => SuperValue5
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("underline")) => UnderlineValue5

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, RenderType5] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: RenderType5, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_LevelTypeFormat = new DefaultGenerated_LevelTypeFormat {}
  trait DefaultGenerated_LevelTypeFormat extends scalaxb.XMLFormat[LevelType] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): LevelType = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("class")) => ClassValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("collection")) => CollectionValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("file")) => FileValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("fonds")) => FondsValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("item")) => ItemValue2
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("otherlevel")) => OtherlevelValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("recordgrp")) => RecordgrpValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("series")) => SeriesValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("subfonds")) => SubfondsValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("subgrp")) => SubgrpValue
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("subseries")) => SubseriesValue

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, LevelType] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: LevelType, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_UnitdatetypeFormat = new DefaultGenerated_UnitdatetypeFormat {}
  trait DefaultGenerated_UnitdatetypeFormat extends scalaxb.XMLFormat[Unitdatetype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Unitdatetype = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bulk")) => Bulk
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("inclusive")) => Inclusive

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Unitdatetype] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Unitdatetype, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_CoverageType3Format = new DefaultGenerated_CoverageType3Format {}
  trait DefaultGenerated_CoverageType3Format extends scalaxb.XMLFormat[CoverageType3] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): CoverageType3 = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("whole")) => WholeValue3
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("part")) => PartValue4

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, CoverageType3] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: CoverageType3, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }

  def buildGenerated_Avu46booleanFormat = new DefaultGenerated_Avu46booleanFormat {}
  trait DefaultGenerated_Avu46booleanFormat extends scalaxb.XMLFormat[Avu46boolean] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def fromString(value: String, scope: scala.xml.NamespaceBinding): Avu46boolean = scalaxb.fromXML[String](scala.xml.Text(value)) match {
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("true")) => True
      case x: String if x == scalaxb.fromXML[String](scala.xml.Text("false")) => False

    }

    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Avu46boolean] = seq match {
      case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope))
      case _ => Right(fromString(seq.text, scala.xml.TopScope))
    }
    
    def writes(__obj: Avu46boolean, __namespace: Option[String], __elementLabel: Option[String],
        __scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq =
      scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, 
        __elementLabel getOrElse { sys.error("missing element label.") },
        scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString))
  }


  trait Generated_Mu46mixedu46basicu46plusu46elementsGroupFormat extends Generated_Mu46mixedu46basicu46elementsGroupFormat {
    def parseMu46mixedu46basicu46plusu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Any]] =
      ((parseMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46mixedu46basicu46plusu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Any]] =
      ((parseMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46mixedu46basicu46plusu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      ((parsemixedMu46mixedu46basicu46elementsGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "footnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Footnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "num")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "quote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Quote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46mixedu46basicu46elementsGroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46mixedu46basicu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46mixedu46basicu46elementsOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abbr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "emph")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Emph](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "expan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Expan](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "foreign")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Foreign](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "lb")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lb](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46mixedu46basicu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46mixedu46basicu46elementsOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abbr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "emph")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Emph](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "expan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Expan](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "foreign")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Foreign](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "lb")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lb](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46mixedu46basicu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      (((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abbr](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "emph")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Emph](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "expan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Expan](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "foreign")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Foreign](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "lb")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lb](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46didGroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46didGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46didOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abstract")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abstract](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "container")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Container](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dao")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dao](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daoset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daoset](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "didnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Didnote](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "langmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Langmaterial](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "materialspec")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Materialspec](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "origination")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Origination](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdescset](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdesc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdesc](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescstructured")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdescstructured](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physloc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physloc](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "repository")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Repository](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitdate")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitdate](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitdatestructured")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitdatestructured](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitid")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitid](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unittitle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unittitle](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46didGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46didOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abstract")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abstract](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "container")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Container](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dao")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dao](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daoset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daoset](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "didnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Didnote](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "langmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Langmaterial](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "materialspec")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Materialspec](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "origination")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Origination](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdescset](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdesc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdesc](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescstructured")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdescstructured](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physloc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physloc](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "repository")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Repository](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitdate")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitdate](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitdatestructured")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitdatestructured](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitid")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitid](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unittitle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unittitle](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46didGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      (((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abstract")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abstract](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "container")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Container](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "dao")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dao](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "daoset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Daoset](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "didnote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Didnote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "langmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Langmaterial](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "materialspec")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Materialspec](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "origination")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Origination](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescset")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdescset](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdesc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdesc](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physdescstructured")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physdescstructured](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "physloc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Physloc](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "repository")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Repository](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitdate")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitdate](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitdatestructured")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitdatestructured](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unitid")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unitid](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "unittitle")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Unittitle](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46accessGroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46accessGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46accessOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "persname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Persname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "corpname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Corpname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "famname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Famname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "geogname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Geogname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "name")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Name](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "occupation")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Occupation](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "subject")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Subject](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "genreform")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Genreform](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "function")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "title")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Title](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46accessGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46accessOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "persname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Persname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "corpname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Corpname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "famname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Famname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "geogname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Geogname](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "name")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Name](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "occupation")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Occupation](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "subject")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Subject](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "genreform")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Genreform](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "function")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "title")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Title](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46accessGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      (((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "persname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Persname](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "corpname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Corpname](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "famname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Famname](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "geogname")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Geogname](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "name")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Name](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "occupation")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Occupation](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "subject")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Subject](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "genreform")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Genreform](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "function")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "title")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Title](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46interu46noquoteGroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46interu46noquoteGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46interu46noquoteOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "chronlist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chronlist](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "table")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Table](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46interu46noquoteGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46interu46noquoteOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "chronlist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chronlist](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "table")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Table](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46interu46noquoteGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      (((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "chronlist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chronlist](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "list")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ListType](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "table")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Table](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46blocksGroupFormat extends Generated_Mu46interGroupFormat {
    def parseMu46blocksGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Any]] =
      ((parseMu46interGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46blocksGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Any]] =
      ((parseMu46interGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46blocksGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      ((parsemixedMu46interGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "p")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46interGroupFormat extends Generated_Mu46interu46noquoteGroupFormat {
    def parseMu46interGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Any]] =
      ((parseMu46interu46noquoteGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "blockquote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Blockquote](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46interGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Any]] =
      ((parseMu46interu46noquoteGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "blockquote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Blockquote](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46interGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      ((parsemixedMu46interu46noquoteGroup(node, scalaxb.ElemName(node) :: stack)) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "blockquote")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Blockquote](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46cOrC01GroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46cOrC01Group(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46cOrC01Option]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[C](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c01")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[C01](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46cOrC01Group(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46cOrC01Option]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[C](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c01")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[C01](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46cOrC01Group(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      ((((safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c")) ^^ 
      (_.toSeq map { x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[C](x, scalaxb.ElemName(node) :: stack)) })) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(p1,
        p2.toList) }) ||| 
      (((safeRep(scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "c01")) ^^ 
      (_.toSeq map { x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[C01](x, scalaxb.ElemName(node) :: stack)) })) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(p1,
        p2.toList) }))
  }


  trait Generated_Mu46descu46baseGroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46descu46baseGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46descu46baseOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accessrestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accessrestrict](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accruals")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accruals](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "acqinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Acqinfo](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "altformavail")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Altformavail](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "appraisal")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Appraisal](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "arrangement")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Arrangement](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibliography")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibliography](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bioghist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bioghist](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "controlaccess")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Controlaccess](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "custodhist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Custodhist](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "fileplan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fileplan](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "index")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Index](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "legalstatus")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Legalstatus](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "odd")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Odd](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "originalsloc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Originalsloc](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "otherfindaid")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Otherfindaid](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "phystech")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Phystech](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "prefercite")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Prefercite](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "processinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Processinfo](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Relatedmaterial](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relations")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Relations](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "scopecontent")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Scopecontent](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "separatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Separatedmaterial](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "userestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Userestrict](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46descu46baseGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46descu46baseOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accessrestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accessrestrict](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accruals")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accruals](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "acqinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Acqinfo](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "altformavail")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Altformavail](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "appraisal")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Appraisal](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "arrangement")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Arrangement](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibliography")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibliography](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bioghist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bioghist](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "controlaccess")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Controlaccess](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "custodhist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Custodhist](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "fileplan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fileplan](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "index")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Index](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "legalstatus")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Legalstatus](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "odd")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Odd](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "originalsloc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Originalsloc](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "otherfindaid")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Otherfindaid](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "phystech")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Phystech](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "prefercite")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Prefercite](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "processinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Processinfo](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Relatedmaterial](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relations")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Relations](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "scopecontent")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Scopecontent](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "separatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Separatedmaterial](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "userestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Userestrict](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46descu46baseGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      (((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accessrestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accessrestrict](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "accruals")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Accruals](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "acqinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Acqinfo](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "altformavail")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Altformavail](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "appraisal")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Appraisal](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "arrangement")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Arrangement](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bibliography")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bibliography](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "bioghist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bioghist](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "controlaccess")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Controlaccess](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "custodhist")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Custodhist](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "fileplan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fileplan](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "index")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Index](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "legalstatus")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Legalstatus](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "odd")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Odd](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "originalsloc")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Originalsloc](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "otherfindaid")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Otherfindaid](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "phystech")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Phystech](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "prefercite")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Prefercite](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "processinfo")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Processinfo](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Relatedmaterial](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "relations")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Relations](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "scopecontent")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Scopecontent](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "separatedmaterial")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Separatedmaterial](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "userestrict")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Userestrict](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46refsGroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46refsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46refsOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46refsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46refsOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46refsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      (((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }


  trait Generated_Mu46mixedu46basicu46dateu46elementsGroupFormat extends scalaxb.AnyElemNameParser {
    def parseMu46mixedu46basicu46dateu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Mu46mixedu46basicu46dateu46elementsOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abbr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "emph")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Emph](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "expan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Expan](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "foreign")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Foreign](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "lb")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lb](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))))
  
    def parseMu46mixedu46basicu46dateu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Mu46mixedu46basicu46dateu46elementsOption]] =
      (((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abbr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "emph")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Emph](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "expan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Expan](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "foreign")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Foreign](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "lb")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lb](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) | 
      ((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))))
    
    def parsemixedMu46mixedu46basicu46dateu46elementsGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] =
      (((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "abbr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Abbr](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "date")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Date](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "emph")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Emph](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "expan")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Expan](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "foreign")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Foreign](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "lb")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lb](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ptr")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ptr](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }) ||| 
      ((((scalaxb.ElemName(Some("http://ead3.archivists.org/schema/"), "ref")) ^^ 
      (x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ref](x, scalaxb.ElemName(node) :: stack)))) ~ 
      optTextRecord) ^^ 
        { case p1 ~ p2 => Seq.concat(Seq(p1),
        p2.toList) }))
  }

  trait DefaultGenerated_Au46transliterationFormat extends scalaxb.AttributeGroupFormat[Au46transliteration] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46transliteration] = seq match {
      case node: scala.xml.Node => Right(Au46transliteration(scalaxb.fromXML[String]((node \ "@transliteration"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46transliteration, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "transliteration", __obj.transliteration.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46coverageFormat extends scalaxb.AttributeGroupFormat[Au46coverage] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46coverage] = seq match {
      case node: scala.xml.Node => Right(Au46coverage(scalaxb.fromXML[CoverageType3]((node \ "@coverage"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46coverage, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "coverage", __obj.coverage.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46colsepFormat extends scalaxb.AttributeGroupFormat[Au46colsep] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46colsep] = seq match {
      case node: scala.xml.Node => Right(Au46colsep(scalaxb.fromXML[Avu46boolean]((node \ "@colsep"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46colsep, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "colsep", __obj.colsep.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46charoffFormat extends scalaxb.AttributeGroupFormat[Au46charoff] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46charoff] = seq match {
      case node: scala.xml.Node => Right(Au46charoff(scalaxb.fromXML[String]((node \ "@charoff"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46charoff, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "charoff", __obj.charoff.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46unitdatetypeFormat extends scalaxb.AttributeGroupFormat[Au46unitdatetype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46unitdatetype] = seq match {
      case node: scala.xml.Node => Right(Au46unitdatetype((node \ "@unitdatetype").headOption map { scalaxb.fromXML[Unitdatetype](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46unitdatetype, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.unitdatetype foreach { x => attr = scala.xml.Attribute(null, "unitdatetype", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Au46localtypeFormat extends scalaxb.AttributeGroupFormat[Au46localtype] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46localtype] = seq match {
      case node: scala.xml.Node => Right(Au46localtype(scalaxb.fromXML[String]((node \ "@localtype"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46localtype, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "localtype", __obj.localtype.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46encodinganalogFormat extends scalaxb.AttributeGroupFormat[Au46encodinganalog] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46encodinganalog] = seq match {
      case node: scala.xml.Node => Right(Au46encodinganalog(scalaxb.fromXML[String]((node \ "@encodinganalog"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46encodinganalog, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "encodinganalog", __obj.encodinganalog.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46certaintyFormat extends scalaxb.AttributeGroupFormat[Au46certainty] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46certainty] = seq match {
      case node: scala.xml.Node => Right(Au46certainty(scalaxb.fromXML[String]((node \ "@certainty"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46certainty, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "certainty", __obj.certainty.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46lastdatetimeverifiedFormat extends scalaxb.AttributeGroupFormat[Au46lastdatetimeverified] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46lastdatetimeverified] = seq match {
      case node: scala.xml.Node => Right(Au46lastdatetimeverified(scalaxb.fromXML[String]((node \ "@lastdatetimeverified"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46lastdatetimeverified, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "lastdatetimeverified", __obj.lastdatetimeverified.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Amu46datesu46eraFormat extends scalaxb.AttributeGroupFormat[Amu46datesu46era] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46datesu46era] = seq match {
      case node: scala.xml.Node => Right(Amu46datesu46era((node \ "@era").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46datesu46era, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.era foreach { x => attr = scala.xml.Attribute(null, "era", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Au46labelFormat extends scalaxb.AttributeGroupFormat[Au46label] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46label] = seq match {
      case node: scala.xml.Node => Right(Au46label(scalaxb.fromXML[String]((node \ "@label"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46label, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "label", __obj.label.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46valignFormat extends scalaxb.AttributeGroupFormat[Au46valign] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46valign] = seq match {
      case node: scala.xml.Node => Right(Au46valign(scalaxb.fromXML[ValignType4]((node \ "@valign"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46valign, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "valign", __obj.valign.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46entityrefFormat extends scalaxb.AttributeGroupFormat[Au46entityref] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46entityref] = seq match {
      case node: scala.xml.Node => Right(Au46entityref(scalaxb.fromXML[String]((node \ "@entityref"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46entityref, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "entityref", __obj.entityref.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46relatorFormat extends scalaxb.AttributeGroupFormat[Au46relator] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46relator] = seq match {
      case node: scala.xml.Node => Right(Au46relator(scalaxb.fromXML[String]((node \ "@relator"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46relator, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "relator", __obj.relator.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46identifierFormat extends scalaxb.AttributeGroupFormat[Au46identifier] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46identifier] = seq match {
      case node: scala.xml.Node => Right(Au46identifier(scalaxb.fromXML[String]((node \ "@identifier"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46identifier, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "identifier", __obj.identifier.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46linku46titleFormat extends scalaxb.AttributeGroupFormat[Au46linku46title] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46linku46title] = seq match {
      case node: scala.xml.Node => Right(Au46linku46title(scalaxb.fromXML[String]((node \ "@linktitle"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46linku46title, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "linktitle", __obj.linktitle.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46linku46roleFormat extends scalaxb.AttributeGroupFormat[Au46linku46role] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46linku46role] = seq match {
      case node: scala.xml.Node => Right(Au46linku46role(scalaxb.fromXML[java.net.URI]((node \ "@linkrole"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46linku46role, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "linkrole", __obj.linkrole.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46linku46arcroleFormat extends scalaxb.AttributeGroupFormat[Au46linku46arcrole] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46linku46arcrole] = seq match {
      case node: scala.xml.Node => Right(Au46linku46arcrole(scalaxb.fromXML[java.net.URI]((node \ "@arcrole"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46linku46arcrole, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "arcrole", __obj.arcrole.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Amu46accessu46nou46normalFormat extends scalaxb.AttributeGroupFormat[Amu46accessu46nou46normal] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46accessu46nou46normal] = seq match {
      case node: scala.xml.Node => Right(Amu46accessu46nou46normal((node \ "@source").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@rules").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@identifier").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46accessu46nou46normal, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
    __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
    __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46descu46cFormat extends scalaxb.AttributeGroupFormat[Amu46descu46c] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46descu46c] = seq match {
      case node: scala.xml.Node => Right(Amu46descu46c((node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@altrender").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@audience").headOption map { scalaxb.fromXML[Audience](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@lang").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@script").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@base").headOption map { scalaxb.fromXML[java.net.URI](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@level").headOption map { scalaxb.fromXML[Level](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@otherlevel").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@encodinganalog").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46descu46c, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
    __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
    __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
    __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
    __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
    __obj.base foreach { x => attr = scala.xml.Attribute(null, "base", x.toString, attr) }
    __obj.level foreach { x => attr = scala.xml.Attribute(null, "level", x.toString, attr) }
    __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
    __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46commonFormat extends scalaxb.AttributeGroupFormat[Amu46common] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46common] = seq match {
      case node: scala.xml.Node => Right(Amu46common((node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@altrender").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@audience").headOption map { scalaxb.fromXML[Audience](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@lang").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@script").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46common, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
    __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
    __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
    __obj.lang foreach { x => attr = scala.xml.Attribute(null, "lang", x.toString, attr) }
    __obj.script foreach { x => attr = scala.xml.Attribute(null, "script", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46simplelinkFormat extends scalaxb.AttributeGroupFormat[Amu46simplelink] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46simplelink] = seq match {
      case node: scala.xml.Node => Right(Amu46simplelink((node \ "@href").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@linkrole").headOption map { scalaxb.fromXML[java.net.URI](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@arcrole").headOption map { scalaxb.fromXML[java.net.URI](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@linktitle").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@show").headOption map { scalaxb.fromXML[ShowType](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@actuate").headOption map { scalaxb.fromXML[ActuateType](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46simplelink, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
    __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
    __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
    __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
    __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
    __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46internalu46ptrFormat extends scalaxb.AttributeGroupFormat[Amu46internalu46ptr] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46internalu46ptr] = seq match {
      case node: scala.xml.Node => Right(Amu46internalu46ptr((node \ "@target").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@xpointer").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@href").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@linkrole").headOption map { scalaxb.fromXML[java.net.URI](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@arcrole").headOption map { scalaxb.fromXML[java.net.URI](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@linktitle").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@show").headOption map { scalaxb.fromXML[ShowType](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@actuate").headOption map { scalaxb.fromXML[ActuateType](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46internalu46ptr, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.target foreach { x => attr = scala.xml.Attribute(null, "target", x.toString, attr) }
    __obj.xpointer foreach { x => attr = scala.xml.Attribute(null, "xpointer", x.toString, attr) }
    __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) }
    __obj.linkrole foreach { x => attr = scala.xml.Attribute(null, "linkrole", x.toString, attr) }
    __obj.arcrole foreach { x => attr = scala.xml.Attribute(null, "arcrole", x.toString, attr) }
    __obj.linktitle foreach { x => attr = scala.xml.Attribute(null, "linktitle", x.toString, attr) }
    __obj.show foreach { x => attr = scala.xml.Attribute(null, "show", x.toString, attr) }
    __obj.actuate foreach { x => attr = scala.xml.Attribute(null, "actuate", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46commonu46emptyFormat extends scalaxb.AttributeGroupFormat[Amu46commonu46empty] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46commonu46empty] = seq match {
      case node: scala.xml.Node => Right(Amu46commonu46empty((node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@altrender").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@audience").headOption map { scalaxb.fromXML[Audience](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46commonu46empty, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) }
    __obj.altrender foreach { x => attr = scala.xml.Attribute(null, "altrender", x.toString, attr) }
    __obj.audience foreach { x => attr = scala.xml.Attribute(null, "audience", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46descu46baseFormat extends scalaxb.AttributeGroupFormat[Amu46descu46base] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46descu46base] = seq match {
      case node: scala.xml.Node => Right(Amu46descu46base((node \ "@otherlevel").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@encodinganalog").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46descu46base, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.otherlevel foreach { x => attr = scala.xml.Attribute(null, "otherlevel", x.toString, attr) }
    __obj.encodinganalog foreach { x => attr = scala.xml.Attribute(null, "encodinganalog", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46accessFormat extends scalaxb.AttributeGroupFormat[Amu46access] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46access] = seq match {
      case node: scala.xml.Node => Right(Amu46access((node \ "@source").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@rules").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@identifier").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) },
      (node \ "@normal").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46access, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) }
    __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) }
    __obj.identifier foreach { x => attr = scala.xml.Attribute(null, "identifier", x.toString, attr) }
    __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Au46linku46actuateFormat extends scalaxb.AttributeGroupFormat[Au46linku46actuate] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46linku46actuate] = seq match {
      case node: scala.xml.Node => Right(Au46linku46actuate(scalaxb.fromXML[ActuateType2]((node \ "@actuate"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46linku46actuate, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "actuate", __obj.actuate.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46linku46hrefFormat extends scalaxb.AttributeGroupFormat[Au46linku46href] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46linku46href] = seq match {
      case node: scala.xml.Node => Right(Au46linku46href(scalaxb.fromXML[String]((node \ "@href"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46linku46href, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "href", __obj.href.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46linku46showFormat extends scalaxb.AttributeGroupFormat[Au46linku46show] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46linku46show] = seq match {
      case node: scala.xml.Node => Right(Au46linku46show(scalaxb.fromXML[ShowType2]((node \ "@show"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46linku46show, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "show", __obj.show.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46baseFormat extends scalaxb.AttributeGroupFormat[Au46base] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46base] = seq match {
      case node: scala.xml.Node => Right(Au46base(scalaxb.fromXML[java.net.URI]((node \ "@base"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46base, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "base", __obj.base.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46parentFormat extends scalaxb.AttributeGroupFormat[Au46parent] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46parent] = seq match {
      case node: scala.xml.Node => Right(Au46parent(scalaxb.fromXML[Seq[String]]((node \ "@parent"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46parent, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "parent", __obj.parent.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46linku46xpointerFormat extends scalaxb.AttributeGroupFormat[Au46linku46xpointer] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46linku46xpointer] = seq match {
      case node: scala.xml.Node => Right(Au46linku46xpointer(scalaxb.fromXML[String]((node \ "@xpointer"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46linku46xpointer, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "xpointer", __obj.xpointer.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46alignFormat extends scalaxb.AttributeGroupFormat[Au46align] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46align] = seq match {
      case node: scala.xml.Node => Right(Au46align(scalaxb.fromXML[AlignType3]((node \ "@align"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46align, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "align", __obj.align.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46renderFormat extends scalaxb.AttributeGroupFormat[Au46render] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46render] = seq match {
      case node: scala.xml.Node => Right(Au46render(scalaxb.fromXML[RenderType5]((node \ "@render"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46render, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "render", __obj.render.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Amu46datesu46calendarFormat extends scalaxb.AttributeGroupFormat[Amu46datesu46calendar] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46datesu46calendar] = seq match {
      case node: scala.xml.Node => Right(Amu46datesu46calendar((node \ "@calendar").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46datesu46calendar, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.calendar foreach { x => attr = scala.xml.Attribute(null, "calendar", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Amu46dateu46normalFormat extends scalaxb.AttributeGroupFormat[Amu46dateu46normal] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46dateu46normal] = seq match {
      case node: scala.xml.Node => Right(Amu46dateu46normal((node \ "@normal").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46dateu46normal, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.normal foreach { x => attr = scala.xml.Attribute(null, "normal", x.toString, attr) }
      attr
    }
  }

  trait DefaultGenerated_Au46datecharFormat extends scalaxb.AttributeGroupFormat[Au46datechar] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46datechar] = seq match {
      case node: scala.xml.Node => Right(Au46datechar(scalaxb.fromXML[String]((node \ "@datechar"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46datechar, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "datechar", __obj.datechar.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46normalFormat extends scalaxb.AttributeGroupFormat[Au46normal] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46normal] = seq match {
      case node: scala.xml.Node => Right(Au46normal(scalaxb.fromXML[String]((node \ "@normal"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46normal, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "normal", __obj.normal.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46levelFormat extends scalaxb.AttributeGroupFormat[Au46level] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46level] = seq match {
      case node: scala.xml.Node => Right(Au46level(scalaxb.fromXML[LevelType]((node \ "@level"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46level, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "level", __obj.level.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46relatedencodingFormat extends scalaxb.AttributeGroupFormat[Au46relatedencoding] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46relatedencoding] = seq match {
      case node: scala.xml.Node => Right(Au46relatedencoding(scalaxb.fromXML[String]((node \ "@relatedencoding"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46relatedencoding, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "relatedencoding", __obj.relatedencoding.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46charFormat extends scalaxb.AttributeGroupFormat[Au46char] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46char] = seq match {
      case node: scala.xml.Node => Right(Au46char(scalaxb.fromXML[String]((node \ "@char"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46char, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "char", __obj.char.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46colnameFormat extends scalaxb.AttributeGroupFormat[Au46colname] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46colname] = seq match {
      case node: scala.xml.Node => Right(Au46colname(scalaxb.fromXML[String]((node \ "@colname"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46colname, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "colname", __obj.colname.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Au46rowsepFormat extends scalaxb.AttributeGroupFormat[Au46rowsep] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Au46rowsep] = seq match {
      case node: scala.xml.Node => Right(Au46rowsep(scalaxb.fromXML[Avu46boolean]((node \ "@rowsep"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Au46rowsep, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      attr = scala.xml.Attribute(null, "rowsep", __obj.rowsep.toString, attr)
      attr
    }
  }

  trait DefaultGenerated_Amu46countrycodeFormat extends scalaxb.AttributeGroupFormat[Amu46countrycode] {
    val targetNamespace: Option[String] = Some("http://ead3.archivists.org/schema/")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Amu46countrycode] = seq match {
      case node: scala.xml.Node => Right(Amu46countrycode((node \ "@countrycode").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    def toAttribute(__obj: Amu46countrycode, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = __attr
      __obj.countrycode foreach { x => attr = scala.xml.Attribute(null, "countrycode", x.toString, attr) }
      attr
    }
  }


}

